[ 
https://issues.apache.org/jira/browse/S2GRAPH-230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16536611#comment-16536611
 ] 

ASF GitHub Bot commented on S2GRAPH-230:
----------------------------------------

GitHub user SteamShon opened a pull request:

    https://github.com/apache/incubator-s2graph/pull/179

    [S2GRAPH-230]: ResourceManager onEvict cause segmentation fault with 
AnnoyModelFetcher

    - add background task on ResourceManager onEvict.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SteamShon/incubator-s2graph S2GRAPH-230

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-s2graph/pull/179.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #179
    
----
commit 447eca4c24e3915deaa86c8a2e2222976308ea92
Author: DO YUNG YOON <steamshon@...>
Date:   2018-07-09T07:27:22Z

    add background task on ResourceManager onEvict.

----


> ResourceManager onEvict cause segmentation fault with AnnoyModelFetcher
> -----------------------------------------------------------------------
>
>                 Key: S2GRAPH-230
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-230
>             Project: S2Graph
>          Issue Type: Bug
>          Components: s2core
>            Reporter: DOYUNG YOON
>            Assignee: DOYUNG YOON
>            Priority: Minor
>
> Current implementation causes the segmentation fault when the query on edges 
> that bind to custom EdgeFetcher, more specifically AnnoyModelFetcher with 
> cacheTTLInSecs as -1.
> cacheTTLInSecs -1 means we initialize EdgeFetcher instance instead of using 
> local cached instance. 
> SafeUpdateCache put newly instantiated EdgeFetcher instance into guava cache, 
> then call `onEvict` method defined in ResourceManager, which immediately call 
> close() on Annoy4s JNI library, which causes the segmentation fault.
> One quick fix on this issue is scheduling EdgeFetcher's close method in a 
> short period of time delay in the background.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to