[jira] [Assigned] (S2GRAPH-230) ResourceManager onEvict cause segmentation fault with AnnoyModelFetcher

2018-07-09 Thread DOYUNG YOON (JIRA)


 [ 
https://issues.apache.org/jira/browse/S2GRAPH-230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

DOYUNG YOON reassigned S2GRAPH-230:
---

Assignee: DOYUNG YOON

> 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)


[jira] [Commented] (S2GRAPH-230) ResourceManager onEvict cause segmentation fault with AnnoyModelFetcher

2018-07-09 Thread ASF GitHub Bot (JIRA)


[ 
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 447eca4c24e3915deaa86c8a2e976308ea92
Author: DO YUNG YOON 
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)


[jira] [Commented] (S2GRAPH-231) Change the GraphQL type name to a valid string.

2018-07-09 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on S2GRAPH-231:


GitHub user daewon opened a pull request:

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

[S2GRAPH-231] Change the GraphQL type name to a valid string.

I added the `toValidaName` function to create a valid string in GraphQL and 
applied it to `ObjectName`.

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

$ git pull https://github.com/daewon/incubator-s2graph S2GRAPH-231

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

https://github.com/apache/incubator-s2graph/pull/180.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 #180


commit 8ff8c233e8a4f1194702c649bff3f5a99cb8273d
Author: daewon 
Date:   2018-07-10T05:20:37Z

add toValidName




> Change the GraphQL type name to a valid string.
> ---
>
> Key: S2GRAPH-231
> URL: https://issues.apache.org/jira/browse/S2GRAPH-231
> Project: S2Graph
>  Issue Type: Improvement
>  Components: s2graphql
>Reporter: Daewon Jeong
>Priority: Minor
>
> Below is a regular expression for valid strings in GraphQL.
> {code:scala}
> val validateRegEx = "/^[_a-zA-Z][_a-zA-Z0-9]*$/.".r
> {code}
> ex) invalid type name
>   1. '-label' : hyphen
>   2. '100k' : starts with numeric
>   3. 'one-more' : hyphen
> Label, service, serviceColumn, etc. created before S2Graph supports GraphQL 
> do not follow the regular expression rule.
> Provides the ability to convert an invalid name to a valid name for backwards 
> compatibility.



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


[jira] [Assigned] (S2GRAPH-231) Change the GraphQL type name to a valid string.

2018-07-09 Thread Daewon Jeong (JIRA)


 [ 
https://issues.apache.org/jira/browse/S2GRAPH-231?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daewon Jeong reassigned S2GRAPH-231:


Assignee: Daewon Jeong

> Change the GraphQL type name to a valid string.
> ---
>
> Key: S2GRAPH-231
> URL: https://issues.apache.org/jira/browse/S2GRAPH-231
> Project: S2Graph
>  Issue Type: Improvement
>  Components: s2graphql
>Reporter: Daewon Jeong
>Assignee: Daewon Jeong
>Priority: Minor
>
> Below is a regular expression for valid strings in GraphQL.
> {code:scala}
> val validateRegEx = "/^[_a-zA-Z][_a-zA-Z0-9]*$/.".r
> {code}
> ex) invalid type name
>   1. '-label' : hyphen
>   2. '100k' : starts with numeric
>   3. 'one-more' : hyphen
> Label, service, serviceColumn, etc. created before S2Graph supports GraphQL 
> do not follow the regular expression rule.
> Provides the ability to convert an invalid name to a valid name for backwards 
> compatibility.



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


[jira] [Assigned] (S2GRAPH-232) Elimination of inefficiency due to duplication in GraphQL schema generation.

2018-07-09 Thread Daewon Jeong (JIRA)


 [ 
https://issues.apache.org/jira/browse/S2GRAPH-232?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daewon Jeong reassigned S2GRAPH-232:


Assignee: Daewon Jeong

> Elimination of inefficiency due to duplication in GraphQL schema generation.
> 
>
> Key: S2GRAPH-232
> URL: https://issues.apache.org/jira/browse/S2GRAPH-232
> Project: S2Graph
>  Issue Type: Improvement
>  Components: s2graphql
>Reporter: Daewon Jeong
>Assignee: Daewon Jeong
>Priority: Minor
>
> Elimination of inefficiency due to duplication in GraphQL Schema generation.
> Generates Schema for GraphQL based on S2Graph Model information when 
> executing GraphQL server.
> Now,
> 1. Based on each Service
> 2. Create a Object type for the associated ServiceColumn
> 3. Find the Label that holds the ServiceColumn as the Source and create the 
> Label Object type.
> 4. The Label object Type is generated from the Source ServiceColumn, and 
> because it has the Target ServiceColumn, it returns to the second operation 
> based on that ServiceColumn.
> In the above four steps, the tasks 2 to 4 may overlap.
> Therefore, Graphql Schema generation is slowed down by unnecessary Schema 
> generation.
> Eliminate unnecessary duplication to lighten the schema.



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