我使用cnosdb在多个集群之间进行订阅,但是多次执行后发现目标集群总是缺少一些数据。我的执行步骤如下:
订阅订阅
create subscription sub001 on benchmark DESTINATIONS any "127.0.0.1:8913" "127.0.0.1:8923" ;
2.将数据导入源集群;
cat Downloads/cnosdb-2023-01-03-16-17-1000r-data|./bin/load_cnosdb --urls 'http://localhost:8902' --batch-size 10
data source:
3.检查数据行;
source:
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 1000 |
+-----------------+
Query took 32.788 seconds.
DESTINATIONS 1
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 490 |
+-----------------+
Query took 3.129 seconds.
DESTINATIONS 2
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 500 |
+-----------------+
Query took 3.126 seconds.
然后我测试了几次,结果如下:
100 行:
cat Downloads/cnosdb-2023-01-03-16-17-100r-data|./bin/load_cnosdb --urls 'http://localhost:8902' --batch-size 10
data source:
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 100 |
+-----------------+
Query took 6.641 seconds.
DESTINATIONS 1
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 40 |
+-----------------+
Query took 0.242 seconds.
DESTINATIONS 2
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 50 |
+-----------------+
Query took 0.482 seconds.
50行
cat Downloads/cnosdb-2023-01-03-16-17-50r-data|./bin/load_cnosdb --urls 'http://localhost:8902' --batch-size 10
data source
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 50 |
+-----------------+
Query took 3.819 seconds.
DESTINATIONS 1
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 25 |
+-----------------+
Query took 0.208 seconds.
DESTINATIONS 2
benchmark ❯ select count(*) from readings;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 24 |
+-----------------+
Query took 0.285 seconds.
为什么每次都会丢失一些数据?还有其他人遇到过这种情况吗?
这是一个bug,已经在最新版本中修复了,谢谢!