Skip to content

Commit

Permalink
change version micro-seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyuecai committed Jul 23, 2024
1 parent 8f957fc commit abde555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/storage/src/base_meta_value_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class BaseMetaValue : public InternalValue {
}

uint64_t UpdateVersion() {
int64_t unix_time = pstd::NowMicros() / 1000000;
int64_t unix_time = rocksdb::Env::Default()->NowMicros();
if (version_ >= unix_time) {
version_++;
} else {
Expand Down Expand Up @@ -171,7 +171,7 @@ class ParsedBaseMetaValue : public ParsedInternalValue {
}

uint64_t UpdateVersion() {
int64_t unix_time = rocksdb::Env::Default()->NowMicros() / 1000;
int64_t unix_time = rocksdb::Env::Default()->NowMicros();
if (version_ >= static_cast<uint64_t>(unix_time)) {
version_++;
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/storage/src/lists_meta_value_format.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class ListsMetaValue : public InternalValue {
}

uint64_t UpdateVersion() {
int64_t unix_time = rocksdb::Env::Default()->NowMicros() / 1000;
int64_t unix_time = rocksdb::Env::Default()->NowMicros();
if (version_ >= static_cast<uint64_t>(unix_time)) {
version_++;
} else {
Expand Down Expand Up @@ -197,7 +197,7 @@ class ParsedListsMetaValue : public ParsedInternalValue {
}

uint64_t UpdateVersion() {
int64_t unix_time = rocksdb::Env::Default()->NowMicros() / 1000;
int64_t unix_time = rocksdb::Env::Default()->NowMicros();
if (version_ >= static_cast<uint64_t>(unix_time)) {
version_++;
} else {
Expand Down

0 comments on commit abde555

Please sign in to comment.