Browse Source

add some comments

main
GUJIEJASON 2 weeks ago
parent
commit
604470f2c4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      db/db_impl.cc

+ 2
- 0
db/db_impl.cc View File

@ -899,6 +899,7 @@ Status DBImpl::InstallCompactionResults(CompactionState* compact) {
return versions_->LogAndApply(compact->compaction->edit(), &mutex_); return versions_->LogAndApply(compact->compaction->edit(), &mutex_);
} }
/* TODO: Check if a string consists entirely of digits */
bool isAllDigits(const std::string& str) { bool isAllDigits(const std::string& str) {
for (char c : str) { for (char c : str) {
if (!isdigit(c)) { if (!isdigit(c)) {
@ -907,6 +908,7 @@ bool isAllDigits(const std::string& str) {
} }
return true; return true;
} }
/* --------------------------- */
Status DBImpl::DoCompactionWork(CompactionState* compact) { Status DBImpl::DoCompactionWork(CompactionState* compact) {
const uint64_t start_micros = env_->NowMicros(); const uint64_t start_micros = env_->NowMicros();

Loading…
Cancel
Save