Coder Social home page Coder Social logo

Comments (4)

chengshiwen avatar chengshiwen commented on July 28, 2024 1

influxdb-cluster 本身就支持数据分散到不同节点进行存储,同时考虑到高可用,会有数据备份(通过设置备份因子)

from influxdb-cluster.

TotoroQwQ avatar TotoroQwQ commented on July 28, 2024

influxdb-cluster 本身就支持数据分散到不同节点进行存储,同时考虑到高可用,会有数据备份(通过设置备份因子)

你好,我现在是设置了3个数据节点,data1,2,3。创建一个库test1,修改备份因子为2。查看数据库策略如下。

> alter retention policy "autogen" on "test1" duration 30d shard duration 2h replication 2
> show retention policies on test1;
name    duration shardGroupDuration replicaN default
----    -------- ------------------ -------- -------
autogen 720h0m0s 2h0m0s             2        true
>
> show shards;
name: test1
id database retention_policy shard_group start_time           end_time             expiry_time          owners
-- -------- ---------------- ----------- ----------           --------             -----------          ------
10 test1    autogen          6           2022-09-09T00:00:00Z 2022-09-09T02:00:00Z 2022-10-09T02:00:00Z 5,6
11 test1    autogen          6           2022-09-09T00:00:00Z 2022-09-09T02:00:00Z 2022-10-09T02:00:00Z 4,5
12 test1    autogen          6           2022-09-09T00:00:00Z 2022-09-09T02:00:00Z 2022-10-09T02:00:00Z 6,4

然后连接data1,插入了100条数据。
关闭data1的数据服务和节点服务。可以在data3上查到所有数据,但是不能count(*)

> select count(*) from test
ERR: dial tcp 20.0.3.200:8088: connectex: No connection could be made because the target machine actively refused it.
>
> select * from test
name: test
time                email         name  phone user_id
----                -----         ----  ----- -------
1662685118421791700 [email protected] Ye    754   44
1662685118508111800 [email protected] ha    555   72
1662685118517086700 [email protected] vyX   971   9

关掉data3,打开data1.情况相反,能查询count(*),不能查到数据

> select count(*) from test
name: test
time count_email count_user_id
---- ----------- -------------
0    100         100
> select * from test
ERR: dial tcp 20.0.3.201:8088: connectex: No connection could be made because the target machine actively refused it.

感觉就是数据存储到了data3上面,但是统计在data1上面,而不是有两个数据备份?是我哪里配置错了吗

from influxdb-cluster.

chengshiwen avatar chengshiwen commented on July 28, 2024

收到,我确认下

from influxdb-cluster.

chengshiwen avatar chengshiwen commented on July 28, 2024

influxdb cluster v1.8.10-c1.1.0 正式发布,对上述问题进行了修复,欢迎使用👏🏻

from influxdb-cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.