-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
area/docdbYugabyteDB core featuresYugabyteDB core featureskind/bugThis issue is a bugThis issue is a bugpriority/mediumMedium priority issueMedium priority issue
Description
Jira Link: DB-20204
Description
We currently have the GetAtomicFlag/SetAtomicFlag functions:
template <class T>
T GetAtomicFlag(T* flag) {
std::atomic<T>& atomic_flag = *pointer_cast<std::atomic<T>*>(flag);
return atomic_flag.load(std::memory_order::relaxed);
}
template <class U, class T>
void SetAtomicFlag(U value, T* flag) {
std::atomic<T>& atomic_flag = *pointer_cast<std::atomic<T>*>(flag);
atomic_flag.store(value);
}
which provide dubious value and are additionally also undefined behavior (there does not exist a std::atomic<T> object at the address pointed to by flag). These should be removed.
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information
- I confirm this issue does not contain any sensitive information.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/docdbYugabyteDB core featuresYugabyteDB core featureskind/bugThis issue is a bugThis issue is a bugpriority/mediumMedium priority issueMedium priority issue