无法修复 Cassandra 中特定节点上的特定表
Cannot repair specific tables on specific nodes in Cassandra
我在 Cassandra 3.10 的一个 DC 中 运行 5 个节点。
当我试图维护这些节点时,我每天 运行 在每个节点上
nodetool repair -pr
每周
nodetool repair -full
这只是table我有困难:
Table: user_tmp
SSTable count: 4
Space used (live): 366.71 MiB
Space used (total): 366.71 MiB
Space used by snapshots (total): 216.87 MiB
Off heap memory used (total): 5.28 MiB
SSTable Compression Ratio: 0.4690289976332873
Number of keys (estimate): 1968368
Memtable cell count: 2353
Memtable data size: 84.98 KiB
Memtable off heap memory used: 0 bytes
Memtable switch count: 1108
Local read count: 62938927
Local read latency: 0.324 ms
Local write count: 62938945
Local write latency: 0.018 ms
Pending flushes: 0
Percent repaired: 76.94
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 4.51 MiB
Bloom filter off heap memory used: 4.51 MiB
Index summary off heap memory used: 717.62 KiB
Compression metadata off heap memory used: 76.96 KiB
Compacted partition minimum bytes: 51
Compacted partition maximum bytes: 654949
Compacted partition mean bytes: 194
Average live cells per slice (last five minutes): 2.503074492537404
Maximum live cells per slice (last five minutes): 179
Average tombstones per slice (last five minutes): 1.0
Maximum tombstones per slice (last five minutes): 1
Dropped Mutations: 19 bytes
修复百分比 在这个 table 和另一个节点上从未超过 80%,但在其他节点上超过 85%。 RF为3,策略为SizeTieredCompactionStrategy
gc_grace_period 是 10 天,当我在那个时期的某个地方我得到 writetimeout 正是这个 table 但是在得到这个超时的消费者立即被另一个取代之后,一切都继续像什么都没发生。就像一次写超时。
我的问题是:您是否有更好的修复策略的建议,因为我是一个菜鸟,每个建议对我来说都是一个巨大的胜利 + 任何其他 table?
也许 repair -inc
而不是 repair -pr
Casandra 3.10 中的nodetool 修复命令默认为运行ning 增量修复。增量修复存在一些重大问题,社区目前不建议 运行 增量修复。请参阅本文以深入了解修复和增量修复的问题:http://thelastpickle.com/blog/2017/12/14/should-you-use-incremental-repair.html
和其他许多人一样,我会推荐 运行:
nodetool repair -full -pr
请注意,您需要 运行 修复集群中的每个节点。这意味着如果你 运行 每天修复一个节点,你最多可以有 7 个节点(因为默认 gc_grace 你应该在 7 天内完成修复)。而且您还必须相信在进行修复时不会出现任何问题,因为您将不得不重新启动任何失败的作业。
这就是 Reaper 等工具存在的原因。它可以轻松解决这些问题,自动修复并让生活更简单。 Reaper 运行 计划进行维修,并提供一个 Web 界面来简化管理。我强烈建议使用 reaper 进行日常维护,使用 nodetool 修复计划外活动。
编辑:Link http://cassandra-reaper.io/
我在 Cassandra 3.10 的一个 DC 中 运行 5 个节点。 当我试图维护这些节点时,我每天 运行 在每个节点上
nodetool repair -pr
每周
nodetool repair -full
这只是table我有困难:
Table: user_tmp
SSTable count: 4
Space used (live): 366.71 MiB
Space used (total): 366.71 MiB
Space used by snapshots (total): 216.87 MiB
Off heap memory used (total): 5.28 MiB
SSTable Compression Ratio: 0.4690289976332873
Number of keys (estimate): 1968368
Memtable cell count: 2353
Memtable data size: 84.98 KiB
Memtable off heap memory used: 0 bytes
Memtable switch count: 1108
Local read count: 62938927
Local read latency: 0.324 ms
Local write count: 62938945
Local write latency: 0.018 ms
Pending flushes: 0
Percent repaired: 76.94
Bloom filter false positives: 0
Bloom filter false ratio: 0.00000
Bloom filter space used: 4.51 MiB
Bloom filter off heap memory used: 4.51 MiB
Index summary off heap memory used: 717.62 KiB
Compression metadata off heap memory used: 76.96 KiB
Compacted partition minimum bytes: 51
Compacted partition maximum bytes: 654949
Compacted partition mean bytes: 194
Average live cells per slice (last five minutes): 2.503074492537404
Maximum live cells per slice (last five minutes): 179
Average tombstones per slice (last five minutes): 1.0
Maximum tombstones per slice (last five minutes): 1
Dropped Mutations: 19 bytes
修复百分比 在这个 table 和另一个节点上从未超过 80%,但在其他节点上超过 85%。 RF为3,策略为SizeTieredCompactionStrategy
gc_grace_period 是 10 天,当我在那个时期的某个地方我得到 writetimeout 正是这个 table 但是在得到这个超时的消费者立即被另一个取代之后,一切都继续像什么都没发生。就像一次写超时。
我的问题是:您是否有更好的修复策略的建议,因为我是一个菜鸟,每个建议对我来说都是一个巨大的胜利 + 任何其他 table?
也许 repair -inc
而不是 repair -pr
Casandra 3.10 中的nodetool 修复命令默认为运行ning 增量修复。增量修复存在一些重大问题,社区目前不建议 运行 增量修复。请参阅本文以深入了解修复和增量修复的问题:http://thelastpickle.com/blog/2017/12/14/should-you-use-incremental-repair.html
和其他许多人一样,我会推荐 运行:
nodetool repair -full -pr
请注意,您需要 运行 修复集群中的每个节点。这意味着如果你 运行 每天修复一个节点,你最多可以有 7 个节点(因为默认 gc_grace 你应该在 7 天内完成修复)。而且您还必须相信在进行修复时不会出现任何问题,因为您将不得不重新启动任何失败的作业。
这就是 Reaper 等工具存在的原因。它可以轻松解决这些问题,自动修复并让生活更简单。 Reaper 运行 计划进行维修,并提供一个 Web 界面来简化管理。我强烈建议使用 reaper 进行日常维护,使用 nodetool 修复计划外活动。
编辑:Link http://cassandra-reaper.io/