forked from couchbase/kv_engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MB-35937: Don't re-check an already authorized command
1) A command passed authorization and is executed, e.g. a sync-write ADD 2) The command returns "would block" (and has set engine-specific) 3) some time passes and ns_server disconnects 4) The engine calls notifyIOComplete 5) The command resumes and is authorized, this time because ns_server is down authorization fails and the command returns "no access". 6) ns_server resumes 7) A new sync-write ADD passes authorization and is executed, it observes that the engine-specific is set and "short-cuts" the actual ADD, it returns success. In this scenario we have now returned success for the ADD at step 7, yet the key has not been stored. To address this issue, update the Cookie object so it can track when authorization was successful, allowing the resumption of the command to skip authorization and complete within the engine. Change-Id: I8e077786b8aadfead849d4f72b8c93450c8dd437 Reviewed-on: http://review.couchbase.org/114815 Tested-by: Build Bot <[email protected]> Reviewed-by: Trond Norbye <[email protected]>
- Loading branch information
1 parent
7559f21
commit 0dd246f
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters