github-actions[bot] commented on code in PR #62058:
URL: https://github.com/apache/doris/pull/62058#discussion_r3165420610


##########
be/src/storage/tablet/tablet.cpp:
##########
@@ -2002,12 +2068,18 @@ void 
Tablet::_init_context_common_fields(RowsetWriterContext& context) {
     context.enable_unique_key_merge_on_write = 
enable_unique_key_merge_on_write();
 
     context.encrypt_algorithm = tablet_meta()->encryption_algorithm();

Review Comment:
   This makes the row-binlog writer write files under 
`tablet->row_binlog_path()` (`<tablet_path>/_row_binlog`), but the production 
create-tablet path only creates the normal schema-hash directory in 
`TabletManager::_create_tablet_meta_and_dir_unlocked()`. There is no 
corresponding `create_directory(row_binlog_path())` before 
`create_initial_rowset()` runs, and the new unit test has to create this 
directory manually before using row-binlog writers. A real `CREATE TABLE ... 
binlog.format=ROW` can therefore fail while flushing/building the initial 
row-binlog rowset because its target directory does not exist. Please create 
the row-binlog subdirectory as part of tablet directory initialization when row 
binlog is enabled, and cover that production path in the test instead of 
pre-creating the directory manually.



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/Replica.java:
##########
@@ -105,6 +107,10 @@ public static class ReplicaContext {
     @SerializedName(value = "lss", alternate = {"localSegmentSize"})
     private long localSegmentSize = 0L;
 
+    // Number of binlog files retained on this replica.

Review Comment:
   The alternate field name has a typo: `binloFileNum` is missing the `g`. If 
any image/edit-log JSON was written with the full field name `binlogFileNum` 
before the short key `bfn`, this alternate will not read it back, so the 
compatibility annotation is ineffective. Please change the alternate to 
`binlogFileNum`.
   
   ```suggestion
       @SerializedName(value = "bfn", alternate = {"binlogFileNum"})
   ```



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/RenameTableOp.java:
##########
@@ -66,6 +66,12 @@ public boolean needChangeMTMVState() {
         return true;
     }
 
+    @Override
+    public boolean allowOpRowBinlog() {
+        // Renaming table does not change schema, allow on row binlog tables.
+        return true;

Review Comment:
   Allowing table rename on row-binlog tables leaves the hidden row-binlog 
index name stale. `OlapTable.setName()` only removes `this.name` and inserts 
`newName` for the base index; it does not rewrite the 
`BinlogUtils.wrapBinlogName(oldName)` entry that `createNewRowBinlogMeta()` 
adds to `indexNameToId`. After `ALTER TABLE ... RENAME`, 
`getIndexNameById(rowBinlogIndexId)` and restore/name remapping paths can still 
observe `binlog<Row>(oldName)`. Either update the row-binlog index-name mapping 
during rename, or keep rename disallowed until that lifecycle is handled.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to