Volker
Volker
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
You are probably right, thanks for taking the time
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
but i would still find it pretty handy to have access to my own execution Context as a Step or Strategy. Whats your opinion on that?
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
thank you for this suggestion. i have to confess, that it seems like i missed the timeLimit step completely while searching for a solution and it's pretty close to perfect. the only problem i have with it (and this is a problem specific to my use case) is, that i need to set a few db entries on timeout which should not be controlled by the query. i'm currently using this solution: g.with('evaluationTimeout',5000).V(4320).repeat(out("script", "evaluationTimeout=5000")).until(has(id, lt(0))).sack()
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
or in the strategy, but afaik the executionTimeout is stored in Context, which does not get passed down to them
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
yes
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
Yes, I already have custom strategies and steps loaded, so this would be the easiest solution for that. A more general solution would probably be either to fix the janusgraph berkeley problem or to handle a timeout more gracefully on gremlin side (e.g. "killing" all gremlins)
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
which contains the timeout value
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
Proposition: Give Step and Strategy access to their current execution Context
17 replies
ATApache TinkerPop
Created by Volker on 3/17/2023 in #questions
Preventing Janusgraph crash on timeout
Situation: 1. Janusgraph with berkeley storage implementation 2. Long running query 3. Timeout value reached (user set or default) Expected: Gremlin shuts down, resulting errors can be catched Actual: Gremlin shuts down, causing a critical berkeley error, which can't be catched and screws the db completely. Solution: Get access to the timeout in the running gremlins. Cancel them automatically before the timeout is reached, thus always resulting in a query that "finishes" on time
17 replies
ATApache TinkerPop
Created by Dinh Phu on 2/2/2023 in #questions
Set TTL for vertex
you are welcome, but keep in mind that it can take some time to actually propagate the TTL changes in janusgraph and only
CQL, HBase and BerkeleyDB
CQL, HBase and BerkeleyDB
support TTL atm
8 replies
ATApache TinkerPop
Created by Dinh Phu on 2/2/2023 in #questions
Set TTL for vertex
mgmt.getVertexLabel('tweet').setTTL(...)
mgmt.getVertexLabel('tweet').setTTL(...)
8 replies
ATApache TinkerPop
Created by Dinh Phu on 2/2/2023 in #questions
Set TTL for vertex
From https://docs.janusgraph.org/schema/advschema/#vertex-ttl :
mgmt = graph.openManagement()
tweet = mgmt.makeVertexLabel('tweet').setStatic().make()
mgmt.setTTL(tweet, Duration.ofHours(36))
mgmt.commit()
mgmt = graph.openManagement()
tweet = mgmt.makeVertexLabel('tweet').setStatic().make()
mgmt.setTTL(tweet, Duration.ofHours(36))
mgmt.commit()
8 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
so after some debugging, I found the problem: JanusGraph registers it's own StandardJanusGraph Graph, which clones the standard Graph strategies, but is loaded before my plugin. To be safe, I just get the private GRAPH_CACHE from GlobalCache, iterate all entries and add my strategy to each of them. This seems to work
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
it executes the same strategies as without the ScriptDecorationStrategy
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
ah sorry, it does not. i just truncated the rest for clarity
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
so it seems like the strategy is not automatically applied for the travelsource on the server, right?
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
the strategy is not applied, but if I enable it again explicitly: gremlin> g.withStrategies(ScriptDecorationStrategy.instance()).V(4224).out().explain() ==>Traversal Explanation =================================================================================================================== Original Traversal [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] ScriptDecorationStrategy [D] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] it's applied
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
...
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
without strategy explicitly enabled: gremlin> g.V(4224).out().explain() ==>Traversal Explanation =================================================================================================================== Original Traversal [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] ConnectiveStrategy [D] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] IdentityRemovalStrategy [O] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] MatchPredicateStrategy [O] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] FilterRankingStrategy [O] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] InlineFilterStrategy [O] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] IncidentToAdjacentStrategy [O] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)] RepeatUnrollStrategy [O] [GraphStep(vertex,[4224]), VertexStep(OUT,vertex)]
73 replies
ATApache TinkerPop
Created by Volker on 1/24/2023 in #questions
Gremlin server plugin for running additional function on each vertex edge
ok, enabled remote console gremlin> :remote console ==>All scripts will now be sent to Gremlin Server - [localhost/127.0.0.1:8182] - type ':remote console' to return to local mode
73 replies