Skip to content

3.10: Read from Followers (allow dirty read) #222

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 4, 2022

Conversation

tjoubert
Copy link
Contributor

Added allow_dirty_read optional parameter to methods for the following:

  • Single document reads (GET /_api/document)
  • Batch document reads (PUT /_api/document?onlyget=true)
  • Read-only AQL queries (POST /_api/cursor)
  • The edge API (GET /_api/edges)
  • Read-only Stream Transactions and their sub-operations (POST /_api/transaction/begin etc.)

https://github.com/arangodb/docs/blob/main/3.10/release-notes-api-changes310.md#read-from-followers

@tjoubert tjoubert requested a review from joowani September 30, 2022 06:59
@tjoubert tjoubert self-assigned this Sep 30, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #222 (14760e3) into main (ef48710) will decrease coverage by 0.07%.
The diff coverage is 72.72%.

@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   99.23%   99.15%   -0.08%     
==========================================
  Files          26       26              
  Lines        3770     3776       +6     
==========================================
+ Hits         3741     3744       +3     
- Misses         29       32       +3     
Impacted Files Coverage Δ
arango/collection.py 99.39% <60.00%> (-0.25%) ⬇️
arango/executor.py 99.39% <75.00%> (-0.61%) ⬇️
arango/aql.py 94.89% <100.00%> (ø)
arango/database.py 99.85% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@joowani joowani left a comment

Choose a reason for hiding this comment

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

Do we need to make allow_dirty_read nullable? It seems like we can get away with just defaulting to False.

@tjoubert
Copy link
Contributor Author

tjoubert commented Oct 4, 2022

Do we need to make allow_dirty_read nullable? It seems like we can get away with just defaulting to False.

Thanks @joowani. I have updated the default value of the allow_dirty_read parameter to False.

@tjoubert tjoubert requested a review from joowani October 4, 2022 07:55
@@ -358,6 +359,8 @@ def execute(
query will not make it into the RocksDB block cache if not already
in there, thus leaving more room for the actual hot set.
:type fill_block_cache: bool
:param allow_dirty_read: Allow reads from followers in a cluster.
:type allow_dirty_read: bool | None
Copy link
Contributor

@joowani joowani Oct 4, 2022

Choose a reason for hiding this comment

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

nit: allow_dirty_read: bool. Same for others.

@joowani joowani merged commit cfd2122 into main Oct 4, 2022
@joowani joowani deleted the DE-356-read-from-followers branch October 4, 2022 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants