Skip to content

fix(shell): make the returned scanners sorted in ascending order by partition index to support fetching specified partition in shell#2312

Merged
acelyc111 merged 2 commits intoapache:masterfrom
limowang:scanner
Nov 4, 2025
Merged

fix(shell): make the returned scanners sorted in ascending order by partition index to support fetching specified partition in shell#2312
acelyc111 merged 2 commits intoapache:masterfrom
limowang:scanner

Conversation

@limowang
Copy link
Copy Markdown
Collaborator

@limowang limowang commented Oct 30, 2025

Fix #2309.

This pull request updates the logic for assigning partition indices in the
async_get_unordered_scanners method of pegasus_client_impl.cpp.
The change ensures that each scanner receives a unique and sequential
partition index, rather than decrementing from the total count, when the
variable max_split_count is greater than the number of partitions in the
table.

Partition assignment logic update:

  • Changed the assignment of partition indices in the scanner creation loop
    to use an incrementing partition_index variable, ensuring unique and
    sequential indices for each partition instead of using a decrementing count
    value.

… does not correctly correspond to the table's partition_id
@github-actions github-actions Bot added the cpp label Oct 30, 2025
@limowang limowang force-pushed the scanner branch 7 times, most recently from 9d396a6 to 9f5e5d0 Compare October 31, 2025 03:02
@limowang limowang changed the title fix(shell): Fix the issue where the scanner index in async_get_unordered_scanners does not correctly correspond to the table's partition_id fix(shell): Fix the failure of the “copy_data -p” command. Oct 31, 2025
@limowang limowang changed the title fix(shell): Fix the failure of the “copy_data -p” command. fix(shell): Fix the failure of the “copy_data -p” command Oct 31, 2025
@limowang limowang requested a review from empiredan October 31, 2025 04:08
@empiredan empiredan added the type/bug-fix This PR fixes a bug. label Oct 31, 2025
Comment thread src/client_lib/pegasus_client_impl.cpp Outdated
Comment thread src/client_lib/pegasus_client_impl.cpp Outdated
Comment thread src/client_lib/pegasus_client_impl.cpp Outdated
Comment thread src/client_lib/pegasus_client_impl.cpp Outdated
Comment thread src/client_lib/pegasus_client_impl.cpp Outdated
Comment thread src/client_lib/pegasus_client_impl.cpp Outdated
@limowang limowang force-pushed the scanner branch 2 times, most recently from f98ff0e to 40abec2 Compare November 3, 2025 00:57
@limowang limowang requested a review from acelyc111 November 3, 2025 03:39
@empiredan empiredan changed the title fix(shell): Fix the failure of the “copy_data -p” command fix(shell): make the returned scanners sorted in ascending order by partition index to support fetching specified partition in shell Nov 3, 2025
@acelyc111 acelyc111 merged commit 0f32557 into apache:master Nov 4, 2025
171 of 173 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cpp type/bug-fix This PR fixes a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug(shell): The index of scanners in the async_get_unordered_scanners function corresponds incorrectly to the partition_id of the table

3 participants