Commit 0dd246f
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]>1 parent 7559f21 commit 0dd246f
3 files changed
+31
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
525 | 526 | | |
526 | 527 | | |
527 | 528 | | |
| |||
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
| 540 | + | |
539 | 541 | | |
540 | 542 | | |
541 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
520 | 520 | | |
521 | 521 | | |
522 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
523 | 543 | | |
524 | 544 | | |
525 | 545 | | |
| |||
608 | 628 | | |
609 | 629 | | |
610 | 630 | | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
611 | 634 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
837 | 841 | | |
838 | 842 | | |
839 | 843 | | |
| |||
849 | 853 | | |
850 | 854 | | |
851 | 855 | | |
| 856 | + | |
852 | 857 | | |
853 | 858 | | |
854 | 859 | | |
| |||
0 commit comments