Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check_and_upgrade_to_pb() should return MetaError, add quota #14899

Merged
merged 1 commit into from Mar 11, 2024

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Mar 11, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

fix: check_and_upgrade_to_pb() should return MetaError, add quota

When writing back upgraded json-to-pb data to meta-service,
it should return MetaError, instead of business error such as
ErrorCode::UnknownRole.

Add quota limit to check_and_upgrade_to_pb: for each API calls, it
upgrades upto 100 records. So that an API call won't be delay a lot.

After upgrading, it should returns the seq number after upgrading.

Changelog

  • Bug Fix

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-bugfix this PR patches a bug in codebase label Mar 11, 2024
@drmingdrmer drmingdrmer marked this pull request as ready for review March 11, 2024 02:56
@drmingdrmer drmingdrmer force-pushed the 37-upgrade-setting-to-pb branch 2 times, most recently from ae767bb to 07def2c Compare March 11, 2024 03:01
Copy link
Collaborator

@TCeason TCeason left a comment

Choose a reason for hiding this comment

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

Quota is necessary. And this pr make the upgrade function more commonly.

LGTM

When writing back upgraded json-to-pb data to meta-service,
it should return `MetaError`, instead of business error such as
`ErrorCode::UnknownRole`.

Add quota limit to `check_and_upgrade_to_pb`: for each API calls, it
upgrades upto 100 records. So that an API call won't be delay a lot.

After upgrading, it should returns the `seq` number after upgrading.
@drmingdrmer drmingdrmer merged commit 6f7e7a1 into datafuselabs:main Mar 11, 2024
71 of 72 checks passed
@drmingdrmer drmingdrmer deleted the 37-upgrade-setting-to-pb branch March 11, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-bugfix this PR patches a bug in codebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants