alpass163 commented on code in PR #18874:
URL: https://github.com/apache/iotdb/pull/18874#discussion_r4311572802
##########
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/procedure/impl/schema/table/view/DropViewProcedure.java:
##########
@@ -38,6 +42,17 @@ public DropViewProcedure(
super(database, tableName, queryId, isGeneratedByPipe);
}
+ /** A dropped view has to leave the tree-to-table view index of every
DataNode. */
+ @Override
+ protected TUpdateTableReq buildCommitReleaseTableReq(final String oldName) {
+ // Unregistering a view needs nothing but its name, which the request
already carries.
+ return SchemaUtils.buildCommitUpdateTableReq(
+ database,
+ table.getTableName(),
+ null,
+ new
TUpdateTree2TableView(TreeToTableViewOperationType.REMOVE.getOperationType()));
Review Comment:
currently the dropViewProcedure does not know whether the view has attribute
of auto_sync_schem, so just make removing an unregistered view a silent no-op.
--
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]