This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch index-fix
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/index-fix by this push:
new d654e2a03b9 pi-fix
d654e2a03b9 is described below
commit d654e2a03b9a23c85845c2f4af168e8d1be69c0c
Author: Caideyipi <[email protected]>
AuthorDate: Thu Feb 26 18:08:19 2026 +0800
pi-fix
---
.../treemodel/auto/basic/IoTDBPipeAlterIT.java | 45 ++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git
a/integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeAlterIT.java
b/integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeAlterIT.java
index 43fdf4ee5e5..d32bc33c956 100644
---
a/integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeAlterIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/pipe/it/dual/treemodel/auto/basic/IoTDBPipeAlterIT.java
@@ -570,4 +570,49 @@ public class IoTDBPipeAlterIT extends
AbstractPipeDualTreeModelAutoIT {
"count(timeseries),",
Collections.singleton("3,"));
}
+
+ @Test
+ public void testAlterPipeRealtime() {
+ final DataNodeWrapper receiverDataNode = receiverEnv.getDataNodeWrapper(0);
+
+ // Insert data on sender
+ TestUtils.executeNonQueries(
+ senderEnv,
+ Arrays.asList(
+ "insert into root.db.d1 (time, at1) values (1000, 1), (1500, 2),
(2000, 3), (2500, 4), (3000, 5)",
+ "flush"),
+ null);
+
+ // Create pipe
+ final String sql =
+ String.format(
+ "create pipe a2b with source ('history.enable'='false') with sink
('node-urls'='%s')",
+ receiverDataNode.getIpAndPortString());
+
+ try (final Connection connection = senderEnv.getConnection();
+ final Statement statement = connection.createStatement()) {
+ statement.execute(sql);
+ } catch (final SQLException e) {
+ fail(e.getMessage());
+ }
+
+ TestUtils.assertDataAlwaysOnEnv(
+ receiverEnv,
+ "count timeSeries root.db.**",
+ "count(timeseries),",
+ Collections.singleton("0,"));
+
+ try (final Connection connection = senderEnv.getConnection();
+ final Statement statement = connection.createStatement()) {
+ statement.execute("alter pipe a2b modify source
('history.enable'='true')");
+ } catch (final SQLException e) {
+ fail(e.getMessage());
+ }
+
+ TestUtils.assertDataEventuallyOnEnv(
+ receiverEnv,
+ "count timeSeries root.db.**",
+ "count(timeseries),",
+ Collections.singleton("1,"));
+ }
}