-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
storage: WAL failover secondary duration negative #136317
Labels
A-storage
Relating to our storage engine (Pebble) on-disk storage.
branch-master
Failures and bugs on the master branch.
branch-release-24.3
Used to mark GA and release blockers, technical advisories, and bugs for 24.3
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-storage
Storage Team
Comments
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Nov 27, 2024
The WAL failover monitor tracks the duration spent writing to the primary and secondary WAL directories. Previously it was possible for updates to these durations to be negative (despite implicitly using the time.Time's monotonic time), because the time was retrieved before acquiring the mutex guarding the accumulated durations. A goroutine that measured the current time first was not necessarily the first to enter the critical section and update the monitor's lastAccumulateIntoDurations field. This commit moves these time measurements under the mutex and adds an assertion that the monitor's understanding of time moves monotonically forward. Informs cockroachdb/cockroach#136317.
jbowens
added a commit
to cockroachdb/pebble
that referenced
this issue
Nov 27, 2024
The WAL failover monitor tracks the duration spent writing to the primary and secondary WAL directories. Previously it was possible for updates to these durations to be negative (despite implicitly using the time.Time's monotonic time), because the time was retrieved before acquiring the mutex guarding the accumulated durations. A goroutine that measured the current time first was not necessarily the first to enter the critical section and update the monitor's lastAccumulateIntoDurations field. This commit moves these time measurements under the mutex and adds an assertion that the monitor's understanding of time moves monotonically forward. Informs cockroachdb/cockroach#136317.
jbowens
added a commit
to jbowens/pebble
that referenced
this issue
Nov 27, 2024
The WAL failover monitor tracks the duration spent writing to the primary and secondary WAL directories. Previously it was possible for updates to these durations to be negative (despite implicitly using the time.Time's monotonic time), because the time was retrieved before acquiring the mutex guarding the accumulated durations. A goroutine that measured the current time first was not necessarily the first to enter the critical section and update the monitor's lastAccumulateIntoDurations field. This commit moves these time measurements under the mutex and adds an assertion that the monitor's understanding of time moves monotonically forward. Informs cockroachdb/cockroach#136317.
jbowens
added a commit
to cockroachdb/pebble
that referenced
this issue
Dec 3, 2024
The WAL failover monitor tracks the duration spent writing to the primary and secondary WAL directories. Previously it was possible for updates to these durations to be negative (despite implicitly using the time.Time's monotonic time), because the time was retrieved before acquiring the mutex guarding the accumulated durations. A goroutine that measured the current time first was not necessarily the first to enter the critical section and update the monitor's lastAccumulateIntoDurations field. This commit moves these time measurements under the mutex and adds an assertion that the monitor's understanding of time moves monotonically forward. Informs cockroachdb/cockroach#136317.
jbowens
added a commit
to jbowens/cockroach
that referenced
this issue
Dec 3, 2024
Changes: * [`a7d74870`](cockroachdb/pebble@a7d74870) wal: prevent negative durations Release note: none. Epic: none. Fix cockroachdb#136317
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-storage
Relating to our storage engine (Pebble) on-disk storage.
branch-master
Failures and bugs on the master branch.
branch-release-24.3
Used to mark GA and release blockers, technical advisories, and bugs for 24.3
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-storage
Storage Team
In #136284, n2 died with a panic of a CrdbTestBuild assertion:
Jira issue: CRDB-44971
The text was updated successfully, but these errors were encountered: