Skip to content

Commit

Permalink
[#25170] YSQL: Remove redundant padding variable in PaddedClockboundCtx
Browse files Browse the repository at this point in the history
Summary:
alignas(CACHELINE_SIZE) serves the function

Fixes #25170
Jira: DB-14339

Test Plan: Jenkins

Reviewers: hsunder

Reviewed By: hsunder

Subscribers: ybase

Differential Revision: https://phorge.dev.yugabyte.com/D40464
  • Loading branch information
pao214 committed Mar 3, 2025
1 parent add35db commit 72484a6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/yb/server/clockbound_clock.cc
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,6 @@ class ClockboundClock : public PhysicalClock {
struct alignas(CACHELINE_SIZE) PaddedClockboundCtx {
std::mutex mutex;
clockbound_ctx *ctx;
char padding[
CACHELINE_SIZE -
(sizeof(std::mutex) + sizeof(clockbound_ctx*)) % CACHELINE_SIZE];
};
static_assert(sizeof(PaddedClockboundCtx) % CACHELINE_SIZE == 0);

Expand Down

0 comments on commit 72484a6

Please sign in to comment.