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

Allow a cluster to run in a skewed clock mode #10932

Open
mbautin opened this issue Dec 22, 2021 · 0 comments
Open

Allow a cluster to run in a skewed clock mode #10932

mbautin opened this issue Dec 22, 2021 · 0 comments
Assignees

Comments

@mbautin
Copy link
Contributor

mbautin commented Dec 22, 2021

In some cases it is useful to shift a cluster's notion of hybrid time by a fixed delta. This is done using the following flag to masters and tablet servers: --time_source=skewed,some_value_ms. There are a few things that we need to do to improve the cluster operation in such cases:

  • Register SkewedClock in the master process.
  • Allow the closing timestamp of WAL segments to be assigned with a similar clock skew. WAL segment closing timestamps are assigned using wall clock in case of successfully writing the footer, and using the hybrid time in case of footer rebuild. The wall clock case needs to be shifted by the clock skew delta in the wall clock case.
  • Modify the log GC mechanism so that WAL segments are retained for the specified amount of time even though their closing timestamp is assigned with a clock skew.
@mbautin mbautin self-assigned this Dec 22, 2021
mbautin added a commit that referenced this issue Feb 12, 2022
Summary:
In some cases it might be useful to shift a cluster's notion of hybrid time by a fixed delta. This is done by passing the following flag to masters and tablet servers: --time_source=skewed,some_value_ms. There are a few things that we need to do to improve the cluster operation in such cases:

- Allow the closing timestamp of WAL segments to be assigned with a similar clock skew. WAL segment closing timestamps are assigned using wall clock in case of successfully writing the footer, and using the hybrid time in case of footer rebuild. The wall clock case needs to be shifted by the clock skew delta in the wall clock case.
- Modify the log GC mechanism so that WAL segments are retained for the specified amount of time even though their closing timestamp is assigned with a clock skew.

Also in this diff we log errors that might happen when determining the WAL data size eligible for garbage collection, instead of silently ignoring them.

Test Plan: Jenkins

Reviewers: rsami

Reviewed By: rsami

Subscribers: ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D14482
jayant07-yb pushed a commit to jayant07-yb/yugabyte-db that referenced this issue Mar 8, 2022
Summary:
In some cases it might be useful to shift a cluster's notion of hybrid time by a fixed delta. This is done by passing the following flag to masters and tablet servers: --time_source=skewed,some_value_ms. There are a few things that we need to do to improve the cluster operation in such cases:

- Allow the closing timestamp of WAL segments to be assigned with a similar clock skew. WAL segment closing timestamps are assigned using wall clock in case of successfully writing the footer, and using the hybrid time in case of footer rebuild. The wall clock case needs to be shifted by the clock skew delta in the wall clock case.
- Modify the log GC mechanism so that WAL segments are retained for the specified amount of time even though their closing timestamp is assigned with a clock skew.

Also in this diff we log errors that might happen when determining the WAL data size eligible for garbage collection, instead of silently ignoring them.

Test Plan: Jenkins

Reviewers: rsami

Reviewed By: rsami

Subscribers: ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D14482
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

No branches or pull requests

1 participant