[HUDI-2595] Fixing metadata table updates such that only regular writes from data table can trigger table services in metadata table (#3900)
This commit is contained in:
committed by
GitHub
parent
7aaf47e716
commit
6d109c6de5
@@ -77,7 +77,7 @@ public class HoodieMetadataTestTable extends HoodieTestTable {
|
||||
HoodieCommitMetadata commitMetadata = super.doWriteOperation(commitTime, operationType, newPartitionsToAdd,
|
||||
partitionToFilesNameLengthMap, bootstrap, createInflightCommit);
|
||||
if (writer != null && !createInflightCommit) {
|
||||
writer.update(commitMetadata, commitTime);
|
||||
writer.update(commitMetadata, commitTime, false);
|
||||
}
|
||||
return commitMetadata;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class HoodieMetadataTestTable extends HoodieTestTable {
|
||||
public HoodieTestTable moveInflightCommitToComplete(String instantTime, HoodieCommitMetadata metadata) throws IOException {
|
||||
super.moveInflightCommitToComplete(instantTime, metadata);
|
||||
if (writer != null) {
|
||||
writer.update(metadata, instantTime);
|
||||
writer.update(metadata, instantTime, false);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -94,7 +94,7 @@ public class HoodieMetadataTestTable extends HoodieTestTable {
|
||||
public HoodieTestTable moveInflightCommitToComplete(String instantTime, HoodieCommitMetadata metadata, boolean ignoreWriter) throws IOException {
|
||||
super.moveInflightCommitToComplete(instantTime, metadata);
|
||||
if (!ignoreWriter && writer != null) {
|
||||
writer.update(metadata, instantTime);
|
||||
writer.update(metadata, instantTime, false);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -103,7 +103,7 @@ public class HoodieMetadataTestTable extends HoodieTestTable {
|
||||
public HoodieTestTable moveInflightCompactionToComplete(String instantTime, HoodieCommitMetadata metadata) throws IOException {
|
||||
super.moveInflightCompactionToComplete(instantTime, metadata);
|
||||
if (writer != null) {
|
||||
writer.update(metadata, instantTime);
|
||||
writer.update(metadata, instantTime, true);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -120,7 +120,7 @@ public class HoodieMetadataTestTable extends HoodieTestTable {
|
||||
public HoodieTestTable addCompaction(String instantTime, HoodieCommitMetadata commitMetadata) throws Exception {
|
||||
super.addCompaction(instantTime, commitMetadata);
|
||||
if (writer != null) {
|
||||
writer.update(commitMetadata, instantTime);
|
||||
writer.update(commitMetadata, instantTime, true);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
@@ -151,7 +151,7 @@ public class HoodieMetadataTestTable extends HoodieTestTable {
|
||||
HoodieReplaceCommitMetadata completeReplaceMetadata) throws Exception {
|
||||
super.addReplaceCommit(instantTime, requestedReplaceMetadata, inflightReplaceMetadata, completeReplaceMetadata);
|
||||
if (writer != null) {
|
||||
writer.update(completeReplaceMetadata, instantTime);
|
||||
writer.update(completeReplaceMetadata, instantTime, true);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user