sjvanrossum commented on code in PR #34165: URL: https://github.com/apache/beam/pull/34165#discussion_r1989506901
########## sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIOUtils.java: ########## @@ -129,19 +131,80 @@ static Map<String, Object> getOffsetConsumerConfig( return offsetConsumerConfig; } - // Maintains approximate average over last 1000 elements - static class MovingAvg { + /* + * Attempt to prevent false sharing by padding to at least 64 bytes. + * object header: 4, 8, 12 or 16 bytes + * alignment: at least 8 bytes + */ + @SuppressFBWarnings("UUF_UNUSED_FIELD") + private static class MovingAvgPadding { + byte p000, p001, p002, p003, p004, p005, p006, p007; Review Comment: Removed layout padding, see comment below. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org