Skip to content

[fix] Imporved robustness of yuanrong_client when calling clear_partition#76

Merged
0oshowero0 merged 6 commits into
Ascend:mainfrom
dpj135:bugfix
Apr 9, 2026
Merged

[fix] Imporved robustness of yuanrong_client when calling clear_partition#76
0oshowero0 merged 6 commits into
Ascend:mainfrom
dpj135:bugfix

Conversation

@dpj135
Copy link
Copy Markdown
Contributor

@dpj135 dpj135 commented Apr 7, 2026

Description

When A is called, batchmeta may contain ( field_name, global_index) that has not been written to the TQ backend.

Main Changes

  • Added a bool variable failback to decide if it should raise error when passing unwritten keys.
  • Set failback = True to self._route_to_strategies in YuanrongStorageClient.clear()

Self-check

image image

dpj135 and others added 3 commits March 17, 2026 11:43
Signed-off-by: dpj135 <958208521@qq.com>
Signed-off-by: dpj135 <958208521@qq.com>

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: dpj135 <958208521@qq.com>
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@dpj135 , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
d5d9b08f Apply suggestions from code revi... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

dpj135 and others added 2 commits April 7, 2026 16:53
Signed-off-by: dpj135 <958208521@qq.com>
Signed-off-by: dpj135 <958208521@qq.com>
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@dpj135 , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
d5d9b08f Apply suggestions from code revi... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@dpj135 dpj135 marked this pull request as draft April 7, 2026 12:09
@dpj135 dpj135 marked this pull request as ready for review April 8, 2026 03:22
@0oshowero0 0oshowero0 requested a review from Copilot April 8, 2026 03:28
@0oshowero0 0oshowero0 changed the title [bugfix] Imporved robustness of 'yuanrong_client' when calling 'clear_partition' [fix] Imporved robustness of yuanrong_client when calling clear_partition Apr 8, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves YuanrongStorageClient.clear() robustness by allowing it to proceed when some provided custom_backend_meta entries don’t match any configured storage strategy (e.g., metadata for keys that were never written).

Changes:

  • Added a failback option to _route_to_strategies() to optionally ignore (instead of error on) unmatched items.
  • Enabled this behavior for YuanrongStorageClient.clear() by passing failback=True.
Comments suppressed due to low confidence (1)

transfer_queue/storage/clients/yuanrong_client.py:620

  • The Returns section says "Every index appears exactly once", but when failback=True unmatched items are intentionally omitted. Please update this part of the docstring to reflect that some indices may be skipped when failback mode is enabled.
            failback: If True, items that don't match any strategy will be ignored (not included in output).
                      If False, a ValueError will be raised for any unmatched item.

        Returns:
            A dictionary mapping each active strategy to a list of indexes in `items`
            that it should handle. Every index appears exactly once.
        """

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread transfer_queue/storage/clients/yuanrong_client.py
Comment thread transfer_queue/storage/clients/yuanrong_client.py
Comment thread transfer_queue/storage/clients/yuanrong_client.py
Signed-off-by: dpj135 <958208521@qq.com>
@ascend-robot
Copy link
Copy Markdown

CLA Signature Guide

@dpj135 , thanks for your pull request.

The following commit(s) are not associated with a signed Contributor License Agreement (CLA).

Commit Reason
d5d9b08f Apply suggestions from code revi... the email used in the commit is not linked to a signed CLA!
please verify that it matches the email you used when signing the CLA.

To sign CLA, click here.

To check if your email is configured correctly, refer to the FAQs.

Once you've signed the CLA or updating your email, please comment /check-cla to revalidate CLA status.

@0oshowero0 0oshowero0 merged commit 0542a8c into Ascend:main Apr 9, 2026
8 checks passed
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