nsivabalan commented on code in PR #13292:
URL: https://github.com/apache/hudi/pull/13292#discussion_r2113363062


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -2855,16 +2864,25 @@ public Integer getWritesFileIdEncoding() {
     return props.getInteger(WRITES_FILEID_ENCODING, 
HoodieMetadataPayload.RECORD_INDEX_FIELD_FILEID_ENCODING_UUID);
   }
 
-  public boolean needResolveWriteConflict(WriteOperationType operationType) {
+  public boolean needResolveWriteConflict(WriteOperationType operationType, 
boolean isMetadataTable, HoodieWriteConfig config,
+                                          HoodieTableConfig tableConfig) {
     WriteConcurrencyMode mode = getWriteConcurrencyMode();
     switch (mode) {
       case SINGLE_WRITER:
         return false;
       case OPTIMISTIC_CONCURRENCY_CONTROL:
         return true;
-      case NON_BLOCKING_CONCURRENCY_CONTROL:
-        // NB-CC don't need to resolve write conflict except bulk insert 
operation
-        return WriteOperationType.BULK_INSERT == operationType;
+      case NON_BLOCKING_CONCURRENCY_CONTROL: {
+        if (isMetadataTable && 
config.isStreamingWritesToMetadataEnabled(tableConfig.getTableVersion())) {
+          // datatable NBCC is still evolving and might go through evolution 
compared to its current state.
+          // But incase of metadata table, when streaming writes are enabled, 
we are leveraging MetadataTableNonBlockingWritesConflictResolutionStrategy to 
do conflict resolution
+          // still keeping future capabilities open to enhance 
MetadataTableNonBlockingWritesConflictResolutionStrategy.

Review Comment:
   synced up f2f. 
   we can't go w/ single writer. 
   



-- 
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]

Reply via email to