[fix] Imporved robustness of yuanrong_client when calling clear_partition#76
Conversation
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>
CLA Signature Guide@dpj135 , thanks for your pull request. The following commit(s) are not associated with a signed Contributor License Agreement (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 |
Signed-off-by: dpj135 <958208521@qq.com>
Signed-off-by: dpj135 <958208521@qq.com>
CLA Signature Guide@dpj135 , thanks for your pull request. The following commit(s) are not associated with a signed Contributor License Agreement (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 |
yuanrong_client when calling clear_partition
There was a problem hiding this comment.
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
failbackoption to_route_to_strategies()to optionally ignore (instead of error on) unmatched items. - Enabled this behavior for
YuanrongStorageClient.clear()by passingfailback=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=Trueunmatched 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.
Signed-off-by: dpj135 <958208521@qq.com>
CLA Signature Guide@dpj135 , thanks for your pull request. The following commit(s) are not associated with a signed Contributor License Agreement (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 |
Description
When A is called, batchmeta may contain ( field_name, global_index) that has not been written to the TQ backend.
Main Changes
failbackto decide if it should raise error when passing unwritten keys.failback = Truetoself._route_to_strategiesinYuanrongStorageClient.clear()Self-check