Skip to content

Commit

Permalink
better consistent name and bool for should_repack
Browse files Browse the repository at this point in the history
  • Loading branch information
brong committed Jan 22, 2025
1 parent 941bdb5 commit dbe58d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/cyrusdb_twom.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static int mydump(struct dbengine *db, int detail)
static int myconsistent(struct dbengine *db)
{
struct twom_db *tmdb = (struct twom_db *)db;
int tmr = twom_db_consistent(tmdb);
int tmr = twom_db_check_consistency(tmdb);
return _errormap(tmr);
}

Expand Down
4 changes: 2 additions & 2 deletions lib/twom.c
Original file line number Diff line number Diff line change
Expand Up @@ -3083,7 +3083,7 @@ int twom_db_dump(struct twom_db *db, int detail)
return r;
}

int twom_db_consistent(struct twom_db *db)
int twom_db_check_consistency(struct twom_db *db)
{
struct twom_txn *txn = NULL;
int r = twom_db_begin_txn(db, TWOM_SHARED, &txn);
Expand All @@ -3093,7 +3093,7 @@ int twom_db_consistent(struct twom_db *db)
return r;
}

int twom_db_should_repack(struct twom_db *db)
bool twom_db_should_repack(struct twom_db *db)
{
struct tm_file *file = db->openfile;
struct tm_header *header = &file->header;
Expand Down
4 changes: 2 additions & 2 deletions lib/twom.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ extern int twom_db_store(struct twom_db *db,

// utility
extern int twom_db_dump(struct twom_db *, int detail);
extern int twom_db_check_consistency(struct twom_db *db);
extern int twom_db_repack(struct twom_db *db);
extern int twom_db_should_repack(struct twom_db *db); // returns 1 for true
extern int twom_db_consistent(struct twom_db *db);
extern bool twom_db_should_repack(struct twom_db *db); // returns 1 for true

// release any read lock if doing something else for a while

Expand Down

0 comments on commit dbe58d6

Please sign in to comment.