MehulBatra commented on code in PR #1552:
URL: https://github.com/apache/fluss/pull/1552#discussion_r2292146334
##########
fluss-lake/fluss-lake-iceberg/src/main/java/com/alibaba/fluss/lake/iceberg/tiering/IcebergLakeWriter.java:
##########
@@ -98,6 +142,16 @@ public void write(LogRecord record) throws IOException {
public IcebergWriteResult complete() throws IOException {
try {
WriteResult writeResult = recordWriter.complete();
+
+ if (compactionFuture != null && !compactionFuture.isDone()) {
+ try {
+ compactionFuture.get(30, TimeUnit.SECONDS);
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Failed to wait for compaction result for bucket:
" + tableBucket, e);
+ }
+ }
+
return new IcebergWriteResult(writeResult);
Review Comment:
We might have to go a DTO/ Pojo way to only capture essential metrics and
serialize them with the result? what do you think or is there any better way?
##########
fluss-lake/fluss-lake-iceberg/src/main/java/com/alibaba/fluss/lake/iceberg/tiering/IcebergLakeWriter.java:
##########
@@ -98,6 +142,16 @@ public void write(LogRecord record) throws IOException {
public IcebergWriteResult complete() throws IOException {
try {
WriteResult writeResult = recordWriter.complete();
+
+ if (compactionFuture != null && !compactionFuture.isDone()) {
+ try {
+ compactionFuture.get(30, TimeUnit.SECONDS);
+ } catch (Exception e) {
+ throw new RuntimeException(
+ "Failed to wait for compaction result for bucket:
" + tableBucket, e);
+ }
+ }
+
return new IcebergWriteResult(writeResult);
Review Comment:
We might have to go a DTO/ Pojo way to only capture essential metrics and
serialize them with the result? what do you think or is there any better way?
please suggest
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]