From a7a00287bb730e9190ec4e77304452b98cea8039 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Wed, 12 Dec 2018 14:52:04 -0800 Subject: [PATCH] ircd::db: Assert the callback thread_id's match up with the current ircd::ctx. --- ircd/db.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ircd/db.cc b/ircd/db.cc index 207d0240b..ede39733e 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -2505,6 +2505,8 @@ noexcept int(info.flush_reason), info.file_path, }; + + assert(info.thread_id == ctx::id(*ctx::current)); } void @@ -2525,6 +2527,8 @@ noexcept info.largest_seqno, int(info.flush_reason) }; + + assert(info.thread_id == ctx::id(*ctx::current)); } void @@ -2547,6 +2551,8 @@ noexcept int(info.status.code()), info.status.getState()?: "OK", }; + + assert(info.thread_id == ctx::id(*ctx::current)); } void