Search code examples
databasecnosdb

When I use CnosDB, I find that drop VNode causes write failure


cnosdb version: ea47f4eb81cee966648f95d4ad34044e8a6f28d3 clusters: 2 data,3 meta

The first time to write data succeeded, but after dropping the VNode, the second time to write data failed, and the VNode was not created

The first data write was successful:

curl -XPOST -u "root:" "http://127.0.0.1:8902/api/v1/write?db=public" -d "ma,ta=a fa=1"
select * from ma;
+----------------------------+----+-----+
| time | ta | fa |
+----------------------------+----+-----+
| 2023-04-27T10:14:25.373394 | a | 1.0 |
+----------------------------+----+-----+

Find and drop the unique VNode :

DROP VNODE 6;
select * from ma;
Query took 0.021 seconds.

The second attempt to write data failed, and VNode not be created:

curl -XPOST -u "root:" "http://127.0.0.1:8902/api/v1/write?db=public" -d "ma,ta=a fa=1"
select * from ma;
Query took 0.020 seconds.

Writing to another node 8912 also failed, and VNode not be created:

curl -XPOST -u "root:" "http://127.0.0.1:8912/api/v1/write?db=public" -d "ma,ta=a fa=1"
8902/8912
select * from ma;
Query took 0.020 seconds.

In my opinion, whether CnosDB VNode is deleted or not, the written data should not be affected.


Solution

  • Recently, I found this issue of cnosdb when browsing github, which may be related to the problem I raised. If this issue is updated, this issue may be solved