Commit 9dd333f
committed
MB-34367 [SR]: Clear engineSpecific on non-success IO complete
For SyncWrites, ep-engine returns EWOULDBLOCK once the prepare has
been accepted, in the golden path blocking the connection until the
SyncWrite completes at which point notify_io_complete is called with
ENGINE_SUCCESS. This results in memcached re-calling the same method
again, which now returns success (as ep-engine records the fact a
SyncWrite is in progrss via storeEngineSpecific().
If a SyncWrite is aborted then the notify_io_complete() is passed
status:ambiguous; which memcached immediately returns to the client.
However, in the non-success case the previous engineSpecific is *not*
cleared. As a consequence the _next_ SyncWrite call by the same client
will immediately return success.
Fix by clearing the engineSpecific on a non-success status code for
notify_IO_complete.
Change-Id: Ie55f23d44e807e01dc16a861724c12cfeb6fe660
Reviewed-on: http://review.couchbase.org/109912
Tested-by: Build Bot <[email protected]>
Reviewed-by: Jim Walker <[email protected]>
Reviewed-by: Trond Norbye <[email protected]>1 parent e696593 commit 9dd333f
File tree
2 files changed
+48
-0
lines changed- engines/ep
- src
- tests/module_tests
2 files changed
+48
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2506 | 2506 | | |
2507 | 2507 | | |
2508 | 2508 | | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
| 2514 | + | |
| 2515 | + | |
2509 | 2516 | | |
2510 | 2517 | | |
2511 | 2518 | | |
| |||
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
790 | 790 | | |
791 | 791 | | |
792 | 792 | | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
793 | 834 | | |
794 | 835 | | |
795 | 836 | | |
| |||
0 commit comments