This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new c4f17560624 Pipe: Fixed the bug that different types in schema
snapshot transfer may cause transfer failure (#13627)
c4f17560624 is described below
commit c4f17560624b209718bfc662228b239d4144e8b1
Author: Caideyipi <[email protected]>
AuthorDate: Thu Sep 26 12:12:32 2024 +0800
Pipe: Fixed the bug that different types in schema snapshot transfer may
cause transfer failure (#13627)
---
.../statemachine/schemaregion/SchemaExecutionVisitor.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
index 29df33fbcc2..ebfa6288892 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/consensus/statemachine/schemaregion/SchemaExecutionVisitor.java
@@ -315,6 +315,18 @@ public class SchemaExecutionVisitor extends
PlanVisitor<TSStatus, ISchemaRegion>
encodingList.remove(index);
compressionTypeList.remove(index);
+ // If with merge is set, the lists are deep copied and need to be
altered here.
+ // We still remove the element from the original list to help
cascading pipe transfer
+ // schema.
+ // If this exception is thrown, the measurements, data types, etc.
must be unchanged.
+ // Thus, the index for the copied lists are identical to that in the
original lists.
+ if (withMerge) {
+ createAlignedTimeSeriesPlan.getMeasurements().remove(index);
+ createAlignedTimeSeriesPlan.getDataTypes().remove(index);
+ createAlignedTimeSeriesPlan.getEncodings().remove(index);
+ createAlignedTimeSeriesPlan.getCompressors().remove(index);
+ }
+
if (measurementList.isEmpty()) {
shouldRetry = false;
}