Skip to content

fix(cloud): page consumer group inventories natively - #7339

Open
X-LightYear wants to merge 1 commit into
apache:rocketmq-studiofrom
X-LightYear:contrib/pair2-cloud-group-pagination
Open

X-LightYear wants to merge 1 commit into
apache:rocketmq-studiofrom
X-LightYear:contrib/pair2-cloud-group-pagination

Conversation

@X-LightYear

Copy link
Copy Markdown
Contributor

Summary

  • use native cloud API pagination for Aliyun and Tencent consumer-group pages
  • avoid enumerating and enriching the complete inventory for one page request
  • preserve search and fallback behavior when a provider response has no usable total

Root cause

MetadataService.listConsumerGroupsPage delegates to the provider SPI. Aliyun and Tencent did
not override InstanceProvider.listConsumerGroupsPage, so the default implementation called the
full listConsumerGroups path and sliced the result in memory. Tencent's full path also performs
per-group detail enrichment.

Fix

  • Aliyun sends pageNumber, pageSize, and the existing search filter to ListConsumerGroups.
  • Tencent sends offset and limit to DescribeConsumerGroupList for the unfiltered page path.
  • Search and responses without a usable total retain the existing fallback semantics.
  • Returned cloud totals are preserved in the existing PageResult contract.

Testing

  • Pre-fix baseline tests failed deterministically:
    • Aliyun: expected total 201, actual total 1 and no page item.
    • Tencent: BusinessException: Tencent Cloud returned an incomplete consumer group page.
  • Post-fix AliyunInstanceProviderTest,TencentInstanceProviderTest: 132 passed.
  • Post-fix provider plus MetadataServiceTest: passed.
  • Checkstyle: 0 violations.
  • Server package reached the existing Windows python3 binary-license gate (exit 9009); Java
    compilation and packaging completed before that environment-only failure.

Fixes #7338

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant