diff options
| author | Stefan Boberg <[email protected]> | 2026-04-01 11:42:21 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-01 11:42:21 +0200 |
| commit | ba4c137e5f5447c37e303ac64519c7c7329ab3e8 (patch) | |
| tree | 1d2e7dcd1323827666ff4462066f95dcced3c673 /src | |
| parent | Zs/oplog export zero size attachment fix (#911) (diff) | |
| download | zen-ba4c137e5f5447c37e303ac64519c7c7329ab3e8.tar.xz zen-ba4c137e5f5447c37e303ac64519c7c7329ab3e8.zip | |
kill stale test processes (zenserver, minio, nomad, consul) before and after CI test runs (#909)
Adds steps to the validate workflow on all platforms that kill any zenserver, minio, nomad, or consul processes launched from the build output directory. Runs before tests to clear stale processes from previous runs, and after tests (always, even on failure) to clean up.
Diffstat (limited to 'src')
| -rw-r--r-- | src/zencompute/computeservice.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/zencompute/computeservice.cpp b/src/zencompute/computeservice.cpp index 58761556a..aaf34cbe2 100644 --- a/src/zencompute/computeservice.cpp +++ b/src/zencompute/computeservice.cpp @@ -1447,15 +1447,19 @@ ComputeServiceSession::Impl::NotifyQueueActionComplete(int QueueId, int Lsn, Run return; } + bool WasActive = false; Queue->m_Lock.WithExclusiveLock([&] { - Queue->ActiveLsns.erase(Lsn); + WasActive = Queue->ActiveLsns.erase(Lsn) > 0; Queue->FinishedLsns.insert(Lsn); }); - const int PreviousActive = Queue->ActiveCount.fetch_sub(1, std::memory_order_relaxed); - if (PreviousActive == 1) + if (WasActive) { - Queue->IdleSince.store(GetHifreqTimerValue(), std::memory_order_relaxed); + const int PreviousActive = Queue->ActiveCount.fetch_sub(1, std::memory_order_relaxed); + if (PreviousActive == 1) + { + Queue->IdleSince.store(GetHifreqTimerValue(), std::memory_order_relaxed); + } } switch (ActionState) |