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

change secondary commit to async execute in background thread #796

Closed
levy5307 opened this issue Jul 29, 2021 · 2 comments
Closed

change secondary commit to async execute in background thread #796

levy5307 opened this issue Jul 29, 2021 · 2 comments
Labels
type/enhancement Indicates new feature requests
Milestone

Comments

@levy5307
Copy link
Contributor

levy5307 commented Jul 29, 2021

Feature Request

Is your feature request related to a problem? Please describe:
In previous implementation, secondary will commit in next prepare request, which will increase latency of prepare request. I think we should add a rpc runs in background to do commit work, to decrease the latency of write request.

For more details: https://levy5307.github.io/blog/2pc/#pacifica

@levy5307 levy5307 added the type/enhancement Indicates new feature requests label Jul 29, 2021
@foreverneverer
Copy link
Contributor

I agree, however, its implementation may be more simple but no background task: we just need put prepare after the ack_prepare_message, for example:

    if (err == ERR_OK && status() != partition_status::PS_ERROR) {
        _private_log->append(mu, LPC_WRITE_REPLICATION_LOG_COMMON, &_tracker, nullptr);
    }
+ prepre.....

@foreverneverer foreverneverer changed the title secondary commit in background change secondary commit in background Aug 13, 2021
@foreverneverer foreverneverer changed the title change secondary commit in background change secondary commit to async execute in background thread Aug 13, 2021
@levy5307
Copy link
Contributor Author

I agree, however, its implementation may be more simple but no background task: we just need put prepare after the ack_prepare_message, for example:

    if (err == ERR_OK && status() != partition_status::PS_ERROR) {
        _private_log->append(mu, LPC_WRITE_REPLICATION_LOG_COMMON, &_tracker, nullptr);
    }
+ prepre.....

Sounds reasonable :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

3 participants