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

*: remove prost support #11099

Merged
merged 10 commits into from
Nov 2, 2021
Merged

*: remove prost support #11099

merged 10 commits into from
Nov 2, 2021

Conversation

BusyJay
Copy link
Member

@BusyJay BusyJay commented Oct 19, 2021

What problem does this PR solve?

Problem Summary:
Since it's not used in production, remove it to reduce dependencies and
codes.

To fully remove prost, we still need pprof to support protobuf-codec.

See also #10905.

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Release note

None

Since it's not used in production, remove it to reduce dependencies and
codes.

To fully remove prost, we still need pprof to support protobuf-codec.

See also tikv#10905.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@ti-chi-bot
Copy link
Member

ti-chi-bot commented Oct 19, 2021

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Connor1996
  • sticnarf

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@siddontang
Copy link
Contributor

awesome, this can simplify our code a lot. I hope we can advance this.

/cc @zhangjinpeng1987

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@sticnarf
Copy link
Contributor

sticnarf commented Oct 26, 2021

Some code recently merged from master include prost related code like https://github.com/BusyJay/tikv/blob/remove-prost-codec/components/cdc/tests/failpoints/test_endpoint.rs#L15.

And some comments (in coprocessor) about prost is invalid. They can be easily found by searching for "prost".

The rest lgtm.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@TennyZhuang
Copy link
Contributor

Why not remove protobuf-rs? Is there any public discussion about this decision?

@BusyJay
Copy link
Member Author

BusyJay commented Oct 27, 2021

Why not remove protobuf-rs? Is there any public discussion about this decision?

You mean prost-codec? It's discussed in the issue provided in the PR description.

@BusyJay
Copy link
Member Author

BusyJay commented Oct 27, 2021

Oh, I see. You mean why not choose prost-codec instead of protobuf-codec? The problems adapting prost-codec are

  • (required) redact support, we log a lot of pb struct directly in code;
  • (required) customizable recursive limit, the default value 100 is quite small for production;
  • (optional) unknown field support. We currently use enum value to distinguish unknown field, not good, but is enough.

I personally prefer protobuf-codec because it has been tested and used in production for quite a long time. If we are going to only keep one codec, protobuf-codec is obviously the safest choice.

Copy link
Contributor

@sticnarf sticnarf left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added status/LGT1 Status: PR - There is already 1 approval needs-rebase labels Oct 28, 2021
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@@ -931,7 +931,11 @@ impl<E: Engine, L: LockManager> Scheduler<E, L> {
SCHED_THROTTLE_TIME.observe(start.saturating_elapsed_secs());
return;
}
async_std::task::sleep(Duration::from_millis(1)).await;
GLOBAL_TIMER_HANDLE
.delay(std::time::Instant::now() + Duration::from_millis(1))
Copy link
Member

Choose a reason for hiding this comment

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

LGTM. Better to reuse the now but seems not easy

@ti-chi-bot ti-chi-bot removed the status/LGT1 Status: PR - There is already 1 approval label Nov 1, 2021
@ti-chi-bot ti-chi-bot added the status/LGT2 Status: PR - There are already 2 approvals label Nov 1, 2021
@BusyJay
Copy link
Member Author

BusyJay commented Nov 1, 2021

/merge

@ti-chi-bot
Copy link
Member

@BusyJay: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: f2f0169

@ti-chi-bot ti-chi-bot added the status/can-merge Status: Can merge to base branch label Nov 1, 2021
@ti-chi-bot
Copy link
Member

@BusyJay: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit 8a16a5b into tikv:master Nov 2, 2021
@BusyJay BusyJay deleted the remove-prost-codec branch November 2, 2021 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note-none size/XXL status/can-merge Status: Can merge to base branch status/LGT2 Status: PR - There are already 2 approvals
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants