1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

fix(DEC):MCOL-5805,5808 to resolve UM-only node crash inside DEC when there is no local PP to send the local requests to. (#3350)

* Revert "fix(DEC): MCOL-5602 fixing potentially endless loop in DEC (#3049)"

This reverts commit 1d416bc6ed.

* fix(DEC):MCOL-5805,5808 to resolve UM-only node crash inside DEC when there is no local PP to send the local requests to.
This commit is contained in:
drrtuy
2024-11-11 18:31:15 +00:00
committed by GitHub
parent 4cba8301d5
commit eaba4d33b4
3 changed files with 102 additions and 78 deletions

View File

@ -22,7 +22,6 @@
#include <unistd.h>
#include <stdint.h>
#include <sched.h>
#include <atomic>
/*
This is an attempt to wrap the differneces between Windows and Linux around atomic ops.
@ -93,15 +92,4 @@ inline void atomicYield()
sched_yield();
}
// This f assumes decrement is smaller than minuend.
template <typename T>
inline void atomicSubstitute(typename std::atomic<T>& minuend, T decrement)
{
T expected = minuend.load();
do
{
expected = minuend.load();
} while (!minuend.compare_exchange_weak(expected, expected - decrement));
}
} // namespace atomicops