Haieketoun
Haieketoun
ATApache TinkerPop
Created by Haieketoun on 2/1/2024 in #questions
AWS Neptune updating gremlin driver to 3.6.2 introduced many bugs to working queries
Hello guys, indeed changing to GraphSON serializer fixed the issue, thank you all kindly for your help
15 replies
ATApache TinkerPop
Created by Haieketoun on 2/1/2024 in #questions
AWS Neptune updating gremlin driver to 3.6.2 introduced many bugs to working queries
Thank you very much for your answer @Florian Hockmann, I will change to GraphSON serializer and get back to you with any updates.
15 replies
ATApache TinkerPop
Created by Haieketoun on 2/1/2024 in #questions
AWS Neptune updating gremlin driver to 3.6.2 introduced many bugs to working queries
C#
return DoWithRetry(async (conn, _) =>
{
var g = conn.TraversalSource;
var eightStagePostIds = await g.V()
.HasLabel(EightLabel.CreatorsContent)
.Has(GraphProperty.IsEightStage, true)
.Has(GraphProperty.PublishedDate, P.Lte(DateTime.UtcNow)) //This breaks 3.6.2 driver
.Where(__
.Not(__
.In(EightEdge.CreatedContent)
.Both(EightEdge.Blocks)
.HasId(citizenId.ToString()))
.Not(__
.In(EightEdge.CreatedContent)
.In(EightEdge.Mutes)
.HasId(citizenId.ToString()))
.Not(__
.Has(GraphProperty.ModerationDecision,
P.Within(ModerationDecisions.Rejected))))
.Order().By(GraphProperty.PublishedDate, Order.Desc)
.Limit<Vertex>(limit)
.ProjectBy(new Dictionary<string, ITraversal>
{
{ "id", __.Id() }
})
.Promise(x => x.ToList());

return eightStagePostIds?.Select(x =>
x["id"].ToString().ToGuid())
.ToReadOnlyList()
?? new List<Guid>();
}, cancellationToken);
C#
return DoWithRetry(async (conn, _) =>
{
var g = conn.TraversalSource;
var eightStagePostIds = await g.V()
.HasLabel(EightLabel.CreatorsContent)
.Has(GraphProperty.IsEightStage, true)
.Has(GraphProperty.PublishedDate, P.Lte(DateTime.UtcNow)) //This breaks 3.6.2 driver
.Where(__
.Not(__
.In(EightEdge.CreatedContent)
.Both(EightEdge.Blocks)
.HasId(citizenId.ToString()))
.Not(__
.In(EightEdge.CreatedContent)
.In(EightEdge.Mutes)
.HasId(citizenId.ToString()))
.Not(__
.Has(GraphProperty.ModerationDecision,
P.Within(ModerationDecisions.Rejected))))
.Order().By(GraphProperty.PublishedDate, Order.Desc)
.Limit<Vertex>(limit)
.ProjectBy(new Dictionary<string, ITraversal>
{
{ "id", __.Id() }
})
.Promise(x => x.ToList());

return eightStagePostIds?.Select(x =>
x["id"].ToString().ToGuid())
.ToReadOnlyList()
?? new List<Guid>();
}, cancellationToken);
15 replies
ATApache TinkerPop
Created by Haieketoun on 2/1/2024 in #questions
AWS Neptune updating gremlin driver to 3.6.2 introduced many bugs to working queries
Thank you for your answer @spmallette, as of my last knowledge, all error types are like this. Specifically, these errors occurring when my query contains Enumerations and DateTime. A solution to this is converting these objects to strings with the ToString() function.
15 replies