Reduce scope of some tick functions in ds RE change feeds (#3403)

This commit is contained in:
Przemyslaw Hugh Kaznowski 2024-01-26 14:31:45 +00:00 committed by GitHub
parent 74d91d430e
commit 0bc284b6dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -829,7 +829,7 @@ impl Datastore {
} }
// save_timestamp_for_versionstamp saves the current timestamp for the each database's current versionstamp. // save_timestamp_for_versionstamp saves the current timestamp for the each database's current versionstamp.
pub async fn save_timestamp_for_versionstamp(&self, ts: u64) -> Result<(), Error> { pub(crate) async fn save_timestamp_for_versionstamp(&self, ts: u64) -> Result<(), Error> {
let mut tx = self.transaction(Write, Optimistic).await?; let mut tx = self.transaction(Write, Optimistic).await?;
if let Err(e) = self.save_timestamp_for_versionstamp_impl(ts, &mut tx).await { if let Err(e) = self.save_timestamp_for_versionstamp_impl(ts, &mut tx).await {
return match tx.cancel().await { return match tx.cancel().await {
@ -865,7 +865,7 @@ impl Datastore {
} }
// garbage_collect_stale_change_feeds deletes all change feed entries that are older than the watermarks. // garbage_collect_stale_change_feeds deletes all change feed entries that are older than the watermarks.
pub async fn garbage_collect_stale_change_feeds(&self, ts: u64) -> Result<(), Error> { pub(crate) async fn garbage_collect_stale_change_feeds(&self, ts: u64) -> Result<(), Error> {
let mut tx = self.transaction(Write, Optimistic).await?; let mut tx = self.transaction(Write, Optimistic).await?;
if let Err(e) = self.garbage_collect_stale_change_feeds_impl(ts, &mut tx).await { if let Err(e) = self.garbage_collect_stale_change_feeds_impl(ts, &mut tx).await {
return match tx.cancel().await { return match tx.cancel().await {