-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: parse timestamp from the name of data dir for gc instead of the …
…last update time (#1667) #1673 It's found that sometimes the data directories of replicas are removed immediately after they are renamed with postfixes `.err/.gar`, though actually both of `gc_disk_error_replica_interval_seconds` and `gc_disk_garbage_replica_interval_seconds` have been configured with at least one day. The reason is that the base time for expiration time is **the last write time**, that is, `st_mtime` within `struct stat` returned by `stat()`. Once a long time has passed since the last write time, the data directory will be removed immediately after it is renamed with postfixes `.err/.gar`. To fix this problem, just use the timestamp within the directory name as the base time that is generated when the data directory is renamed with postfixes `.err/.gar`. The last update time would be used iff the timestamp is NOT found within the directory name.
- Loading branch information
Showing
7 changed files
with
275 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.