Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2024-04-12 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1562928115 ## server-common/src/main/java/org/apache/kafka/server/common/CheckpointFile.java: ## @@ -72,18 +72,20 @@ public CheckpointFile(File file, tempPath =

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2024-04-11 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1561896446 ## server-common/src/main/java/org/apache/kafka/server/common/CheckpointFile.java: ## @@ -72,18 +72,20 @@ public CheckpointFile(File file, tempPath =

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2024-04-08 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1556161125 ## server-common/src/main/java/org/apache/kafka/server/common/CheckpointFile.java: ## @@ -72,18 +72,20 @@ public CheckpointFile(File file, tempPath =

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-29 Thread via GitHub
junrao merged PR #14242: URL: https://github.com/apache/kafka/pull/14242 -- 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:

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-29 Thread via GitHub
ocadaruma commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1831446770 @junrao Thank you for the suggestion. I resolved the conflict. Also created tickets for flaky tests which don't have corresponding JIRA ticket now. - From [previous

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-28 Thread via GitHub
junrao commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1830377377 @ocadaruma : Thanks for looking into the failed tests. If those are unrelated to this PR, it would be useful to file jiras for flaky tests not already tracked. Also, could you resolve the

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-27 Thread via GitHub
ocadaruma commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1828798534 @junrao Oh I misinterpreted as all green with only checking pipeline-view but I had to check tests view. I checked. Seems none of them are related to this change, and failures

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-27 Thread via GitHub
junrao commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1828343208 @ocadaruma : Thanks for rerunning the tests. The latest run still has 21 test failures. Are they related to the PR? -- This is an automated message from the Apache Git Service. To

[PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-22 Thread via GitHub
ocadaruma opened a new pull request, #14242: URL: https://github.com/apache/kafka/pull/14242 JIRA ticket: https://issues.apache.org/jira/browse/KAFKA-15046 - While any blocking operation under holding the UnifiedLog.lock could lead to serious performance (even availability) issues,

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-22 Thread via GitHub
ocadaruma commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1823612335 closing once to rebuild -- 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

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-21 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1401341215 ## storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java: ## @@ -421,16 +430,12 @@ public NavigableMap epochWithOffsets() {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-21 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1401316698 ## storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java: ## @@ -308,7 +308,14 @@ public void truncateFromEnd(long endOffset) {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-21 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1401104692 ## storage/src/main/java/org/apache/kafka/storage/internals/log/SnapshotFile.java: ## @@ -60,10 +60,10 @@ public File file() { return file; } -

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-18 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1398265953 ## storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java: ## @@ -308,7 +308,14 @@ public void truncateFromEnd(long endOffset) {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-06 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1383719872 ## storage/src/main/java/org/apache/kafka/storage/internals/log/SnapshotFile.java: ## @@ -63,7 +63,7 @@ public File file() { public void renameTo(String newSuffix)

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-11-03 Thread via GitHub
ocadaruma commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1791974540 @divijvaidya Hi, thanks for your suggestion. I updated the PR description to include consistency expectations and the analysis of the validity of the changes. -- This is an

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-26 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1374014105 ## storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java: ## @@ -462,22 +462,32 @@ public Optional lastEntry(long producerId) {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-26 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1374014105 ## storage/src/main/java/org/apache/kafka/storage/internals/log/ProducerStateManager.java: ## @@ -462,22 +462,32 @@ public Optional lastEntry(long producerId) {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-26 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1373898465 ## storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java: ## @@ -308,7 +308,14 @@ public void truncateFromEnd(long endOffset) {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-26 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1373536630 ## storage/src/main/java/org/apache/kafka/storage/internals/epoch/LeaderEpochFileCache.java: ## @@ -308,7 +308,14 @@ public void truncateFromEnd(long endOffset) {

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
ocadaruma commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1372463913 ## core/src/main/scala/kafka/log/UnifiedLog.scala: ## @@ -1617,10 +1617,16 @@ class UnifiedLog(@volatile var logStartOffset: Long, // may actually be ahead of

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
jolshan commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1779818679 Thanks -- just catching up with the discussion. Just to clarify when we say: > This is ok for server restart, because on restart, we will rebuild the snapshot by scanning last few

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
junrao commented on code in PR #14242: URL: https://github.com/apache/kafka/pull/14242#discussion_r1364689270 ## core/src/main/scala/kafka/log/UnifiedLog.scala: ## @@ -1617,10 +1617,16 @@ class UnifiedLog(@volatile var logStartOffset: Long, // may actually be ahead of the

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
divijvaidya commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1779404361 > If we ignore producer-state-flush failure here, recovery-point might be incremented even with stale on-disk producer state snapshot. So, in case of restart after power failure, the

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
ocadaruma commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1779086343 @divijvaidya Thank you for your review. > But now, since we are flushing snapshot async & quietly During reading your comment, I realized that "quietly" could be a problem

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
ocadaruma commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1779076146 @divijvaidya Thank you for your review. > > But now, since we are flushing snapshot async & quietly During reading your comment, I found that "quietly" -- This is an

Re: [PR] KAFKA-15046: Get rid of unnecessary fsyncs inside UnifiedLog.lock to stabilize performance [kafka]

2023-10-25 Thread via GitHub
divijvaidya commented on PR #14242: URL: https://github.com/apache/kafka/pull/14242#issuecomment-1778956865 Hey @ocadaruma This is an important change, so I despite low engagement on this from me, I do believe that this change is critical. Let's think carefully about this. I