summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/tiered/tiered_work.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/wiredtiger/src/tiered/tiered_work.c')
-rw-r--r--src/third_party/wiredtiger/src/tiered/tiered_work.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/third_party/wiredtiger/src/tiered/tiered_work.c b/src/third_party/wiredtiger/src/tiered/tiered_work.c
index efc80ea86bd..49097e87f0b 100644
--- a/src/third_party/wiredtiger/src/tiered/tiered_work.c
+++ b/src/third_party/wiredtiger/src/tiered/tiered_work.c
@@ -95,6 +95,18 @@ __wt_tiered_pop_work(
}
/*
+ * __wt_tiered_get_flush_finish --
+ * Get the first flush_finish work unit from the queue. The id information cannot change between
+ * our caller and here. The caller is responsible for freeing the work unit.
+ */
+void
+__wt_tiered_get_flush_finish(WT_SESSION_IMPL *session, WT_TIERED_WORK_UNIT **entryp)
+{
+ __wt_tiered_pop_work(session, WT_TIERED_WORK_FLUSH_FINISH, 0, entryp);
+ return;
+}
+
+/*
* __wt_tiered_get_flush --
* Get the first flush work unit from the queue. The id information cannot change between our
* caller and here. The caller is responsible for freeing the work unit.
@@ -130,6 +142,23 @@ __wt_tiered_get_drop_shared(WT_SESSION_IMPL *session, WT_TIERED_WORK_UNIT **entr
}
/*
+ * __wt_tiered_put_flush_finish --
+ * Add a flush_finish work unit to the queue.
+ */
+int
+__wt_tiered_put_flush_finish(WT_SESSION_IMPL *session, WT_TIERED *tiered, uint32_t id)
+{
+ WT_TIERED_WORK_UNIT *entry;
+
+ WT_RET(__wt_calloc_one(session, &entry));
+ entry->type = WT_TIERED_WORK_FLUSH_FINISH;
+ entry->id = id;
+ entry->tiered = tiered;
+ __wt_tiered_push_work(session, entry);
+ return (0);
+}
+
+/*
* __wt_tiered_put_drop_local --
* Add a drop local work unit for the given ID to the queue.
*/