[fix] Prevent stale reads during clear by marking indexes before storage deletion - #141
Conversation
Signed-off-by: yxstev <zhangyixiang9@huawei.com>
CLA Signature Passdodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍 |
|
Solution for #137 |
|
Unless I've misunderstood, PR uses
I think we need to modify the state machine to identify the “delete” state separately. ACTIVE --> PREPARE_CLEAR(clear_id, generation) -- > CLEARING -->delete success --> COMMIT_CLEAR --> DELETED / release index |
Thanks for the thorough analysis. You're right that The full state machine you proposed (PREPARE_CLEAR → CLEARING → COMMIT_CLEAR) would require significant changes to the tensor structure and introduce retry/generation tracking across the client and controller. I'd prefer to keep that as a future improvement if the single-threaded guarantee ever changes, rather than taking on that complexity now. |
ok, that's fine. |
|
We need to add controller side test in later PR |
Introduce a three-step clear protocol to close the consistency window where storage data is already deleted but the controller still considers the indexes readable: