Skip to content
Snippets Groups Projects
Commit eecd2b90 authored by Nikita Pettik's avatar Nikita Pettik Committed by Nikita Pettik
Browse files

vinyl: introduce vy_lsm_is_being_constructed()

It tells whether LSM tree is currently being constructed, or is already
built and committed.

Needed for #6045
parent ea0b126f
No related branches found
No related tags found
No related merge requests found
......@@ -361,6 +361,16 @@ vy_lsm_is_empty(struct vy_lsm *lsm)
lsm->stat.memory.count.rows == 0);
}
/**
* Return true if LSM tree is currently being built
* (i.e. index_commit_create() hasn't been called yet).
*/
static inline bool
vy_lsm_is_being_constructed(struct vy_lsm *lsm)
{
return lsm->commit_lsn < 0;
}
/**
* Return the averange number of dumps it takes to trigger major
* compaction of a range in this LSM tree.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment