Skip to content

Commit

Permalink
Post-fix for #7814, fixed regression found by QA test for CORE-3625 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
hvlad committed Oct 29, 2023
1 parent 6919bd6 commit dcb7692
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/jrd/jrd.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ const ULONG TDBB_reset_stack = 2048; // stack should be reset after stack ove
const ULONG TDBB_dfw_cleanup = 4096; // DFW cleanup phase is active
const ULONG TDBB_repl_in_progress = 8192; // Prevent recursion in replication
const ULONG TDBB_replicator = 16384; // Replicator
const ULONG TDBB_async = 32768; // Async context (set in AST)

class thread_db : public Firebird::ThreadData
{
Expand Down Expand Up @@ -624,7 +625,11 @@ class thread_db : public Firebird::ThreadData
reqStat->bumpValue(index, delta);
traStat->bumpValue(index, delta);
attStat->bumpValue(index, delta);
// dbbStat adjusted from attStat, see Attachment::mergeAsyncStats()

if ((tdbb_flags & TDBB_async) && !attachment)
dbbStat->bumpValue(index, delta);

// else dbbStat is adjusted from attStat, see Attachment::mergeAsyncStats()
}

void bumpRelStats(const RuntimeStatistics::StatType index, SLONG relation_id, SINT64 delta = 1)
Expand Down Expand Up @@ -1109,6 +1114,8 @@ namespace Jrd {

fb_assert((operator thread_db*())->getAttachment());
}

(*this)->tdbb_flags |= TDBB_async;
}

private:
Expand Down

0 comments on commit dcb7692

Please sign in to comment.