Skip to content

[fix] Clear storage data before releasing controller indexes#137

Merged
ji-huazhong merged 2 commits into
Ascend:mainfrom
dodatboii:fix_clear_index_logics
Jul 10, 2026
Merged

[fix] Clear storage data before releasing controller indexes#137
ji-huazhong merged 2 commits into
Ascend:mainfrom
dodatboii:fix_clear_index_logics

Conversation

@dodatboii

Copy link
Copy Markdown
Contributor

Previously, the clear operation released the storage unit index in the controller before freeing the underlying storage memory. A concurrent actor could acquire the released index, write new data, and then have that data freed by the trailing storage clear — causing silent data loss and missing-field errors on the index during long training runs.

Fix by reversing the order: free storage memory first, then release the index back to the controller's reusable pool.

Previously, the clear operation released the storage unit index in the controller before freeing the underlying storage memory. A concurrent actor could acquire the released index, write new data, and then have that data freed by the trailing storage clear — causing silent data loss and missing-field errors on the index during long training runs.

Fix by reversing the order: free storage memory first, then release the index back to the controller's reusable pool.

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

Signed-off-by: yxstev <zhangyixiang9@huawei.com>
@ascend-robot

Copy link
Copy Markdown

CLA Signature Pass

dodatboii, thanks for your pull request. All authors of the commits have signed the CLA. 👍

@ji-huazhong ji-huazhong merged commit 88687ab into Ascend:main Jul 10, 2026
8 checks passed
@0oshowero0

Copy link
Copy Markdown
Collaborator

I believe this solution is insufficient. The clear operation needs to be transactional (or atomic). The current ordering introduces a consistency issue: data may be removed from SimpleStorage while the controller still believes it is available, allowing clients to acquire data that no longer exists.

Maybe we can:

  1. Notify the controller that the data is pending deletion
  2. Let the storage backend execute the deletion
  3. After successful deletion, confirm the deletion with the controller

@dodatboii CC: @ji-huazhong

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.

4 participants