Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

Erick Ramirez avatar image
Erick Ramirez asked Erick Ramirez answered

Can we repair a Nodesync-enabled table if the service is disabled?

A user wanted to know if it is possible to manually repair a Nodesync-enabled table if the Nodesync service is turned off/disabled.

dserepairnodesync
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered smadhavan edited

By design, tables which have Nodesync configured cannot have an anti-entropy repair run on them. An attempt to run a repair on a Nodesync-enabled table will be rejected, even if the Nodesync service is disabled.

Let me illustrate with this example table:

CREATE TABLE community.members (
    email text PRIMARY KEY,
    name text,
    ...
) WITH nodesync = {'enabled': 'true'};

In this series of commands, I check the status of the Nodesync service and shut it down:

$ nodetool nodesyncservice status
The NodeSync service is running
$ nodetool nodesyncservice disable
$ nodetool nodesyncservice status
The NodeSync service is not running

An attempt to manually repair the table will be rejected by Cassandra:

$ nodetool repair -pr community members
[2020-05-05 12:17:46,575] Cannot run anti-entropy repair on tables with NodeSync enabled (and NodeSync is enabled on [community.members])
[2020-05-05 12:17:46,577] Repair command #1 finished with error
error: Repair job has failed with the error message: [2020-05-05 12:17:46,575] Cannot run anti-entropy repair on tables with NodeSync enabled (and NodeSync is enabled on [community.members])
-- StackTrace --
java.lang.RuntimeException: Repair job has failed with the error message: [2020-05-05 12:17:46,575] Cannot run anti-entropy repair on tables with NodeSync enabled (and NodeSync is enabled on [community.members])
at org.apache.cassandra.tools.RepairRunner.progress(RepairRunner.java:136)
at org.apache.cassandra.utils.progress.jmx.JMXNotificationProgressListener.handleNotification(JMXNotificationProgressListener.java:77)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.dispatchNotification(ClientNotifForwarder.java:583)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.doRun(ClientNotifForwarder.java:533)
at com.sun.jmx.remote.internal.ClientNotifForwarder$NotifFetcher.run(ClientNotifForwarder.java:452)
at com.sun.jmx.remote.internal.ClientNotifForwarder$LinearExecutor$1.run(ClientNotifForwarder.java:108)

For more information, see Nodesync service. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.