We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15d5c9f commit fb04386Copy full SHA for fb04386
crates/database/src/write_log.rs
@@ -371,6 +371,11 @@ pub struct LogReader {
371
impl LogReader {
372
#[fastrace::trace]
373
pub fn refresh_token(&self, token: Token, ts: Timestamp) -> anyhow::Result<Option<Token>> {
374
+ if token.ts() == ts {
375
+ // Nothing to do. We can return Some even if `token.ts()` has fallen
376
+ // out of the write log retention window.
377
+ return Ok(Some(token));
378
+ }
379
let snapshot = { self.inner.lock().log.clone() };
380
block_in_place(|| {
381
let max_ts = snapshot.max_ts();
0 commit comments