Skip to content

Commit

Permalink
[client] RecordAccumulator's ready method will be blocked if no batch…
Browse files Browse the repository at this point in the history
… is ready。
  • Loading branch information
loserwang1024 committed Jan 13, 2025
1 parent c55d2d8 commit 597ddd3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,6 @@ public RecordAppendResult append(
}
return appendResult;
}

} finally {
// Other append operations by the Sender thread may have created a new batch, causing
// the temporarily allocated memorySegment here to go unused, and therefore, it needs to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -422,11 +422,12 @@ void testReadyWithTimeOut() throws Exception {
() -> {
accum.ready(cluster, 60 * 60 * 1000L);
});
Thread.sleep(1000L);
assertThat(future).isNotCompleted();
// initial data.
accum.append(createRecord(row), writeCallback, cluster, 0, false);
accum.append(createRecord(row), writeCallback, cluster, 0, false);
future.get();
Thread.sleep(100L);
assertThat(future).isCompleted();
}

Expand Down

0 comments on commit 597ddd3

Please sign in to comment.