Skip to content

PostCursorOptions - ForceOneShardAttributeValue Option - #512

Merged
DiscoPYF merged 2 commits into
ArangoDB-Community:masterfrom
RonAmihai:post-cursor-force-shard-attr-opt
Aug 17, 2026
Merged

DiscoPYF merged 2 commits into
ArangoDB-Community:masterfrom
RonAmihai:post-cursor-force-shard-attr-opt

Conversation

@RonAmihai

Copy link
Copy Markdown
Contributor

See:

  • Option docs in the Java driver: link
  • Option docs in the Golang driver: link

/// execution on one shard. If set incorrectly (i.e., a wrong shard key value), the query may
/// be shipped to the wrong DBServer and return no results (empty result set). Use at your own risk.
/// </summary>
public string ForceOneShardAttributeValue { get; set; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option doesn't appear in any documentation for the cursor API that I can find, are you able to find a reference for it?

As mentioned in the other PR, I wonder if you could subclass PostCursorOptions and add additional properties? I think JSON.NET serializer will include the additional properties on your subclass

@RonAmihai RonAmihai Oct 18, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The option does not appear in ArangoDB's official REST API specification; however, as I mentioned above, it does appear in the Java and Golang driver docs. I can also link you to relevant ArangoDB developers who will confirm that.

As I mentioned in the other PR, the subclass approach works, so I can achieve what I've needed regarding that option regardless of that PR.

However, I think it's worth adding that option to the cursor option since it's a known ArangoDB option.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RonAmihai. It's not the first time we see undocumented options. Can you confirm the ArangoDB version this was introduced in?

Maybe report this missing option on Slack or on the docs project.

@DiscoPYF DiscoPYF Oct 29, 2025 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a bunch of options that we don't have: allowDirtyReads, allowRetry, cache, fillBlockCache, maxDNFConditionMembers, maxNodesPerCallstack, maxNumberOfPlans, spillOverThresholdMemoryUsage, spillOverThresholdNumRows, usePlanCache.

I opened #516 to capture that.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forceOneShardAttributeValue appears in the changelog under v3.9.0-alpha.1 (2021-11-30): https://github.com/arangodb/arangodb/blob/v3.12.10/CHANGELOG#L8029

It was added in arangodb/arangodb#14701

@DiscoPYF

Copy link
Copy Markdown
Collaborator

Hi @RonAmihai, I'm waking up from a deep slumber 😄

Are you up for updating this PR? It has caught a conflict after merging #517

@DiscoPYF

Copy link
Copy Markdown
Collaborator

Hi @RonAmihai, I'm waking up from a deep slumber 😄

Are you up for updating this PR? It has caught a conflict after merging #517

Never mind, it was an easy one to resolve, I've done it while merging master into this branch. 👌

@DiscoPYF DiscoPYF left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @RonAmihai for this contribution!

Would be nice to mention that this is available from 3.9.0 onwards. But the description is consistent with the java driver and 3.9.0 was a long time ago, so not a big deal.

📝 For future reference:

/// execution on one shard. If set incorrectly (i.e., a wrong shard key value), the query may
/// be shipped to the wrong DBServer and return no results (empty result set). Use at your own risk.
/// </summary>
public string ForceOneShardAttributeValue { get; set; }

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

forceOneShardAttributeValue appears in the changelog under v3.9.0-alpha.1 (2021-11-30): https://github.com/arangodb/arangodb/blob/v3.12.10/CHANGELOG#L8029

It was added in arangodb/arangodb#14701

@DiscoPYF
DiscoPYF merged commit ec43e82 into ArangoDB-Community:master Aug 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants