Using the project step with a partition strategy

122 views
Skip to first unread message

Rob Philp

unread,
Jul 14, 2021, 6:13:43 AM7/14/21
to Gremlin-users
Hi,
When adding a partition strategy to a local tinkerpop connection (using gremlin-javascript), the strategy works fine for simple queries, such as:
const base = new PartitionStrategy({
  partitionKey: '_partition',
  writePartition: 'base',
  readPartitions: ['base'],
});
return g.withStrategies(base).V().valueMap().toList();

However, when I add a project step, say:
g.withStrategies(base).V().project('name').by('name').toList();

I get an error from the gremlin server of:
ResponseError: Server error: PartitionStrategy does not work with anonymous Traversals (500)

I've tried a couple of different queries, but it seems to be introduced when I add the .by() step modulator. However, the error doesn't seem to make sense in this case? I have another query that does include an anonymous traversal within a sideEffect which seems to work ok.

What is the expected behaviour of this?
Reply all
Reply to author
Forward
0 new messages