DataStax Academy FAQ

DataStax Academy migrated to a new learning management system (LMS) in July 2020. We are also moving to a new Cassandra Certification process so there are changes to exam bookings, voucher system and issuing of certificates.

Check out the Academy FAQ pages for answers to your questions:


question

Erick Ramirez avatar image
Erick Ramirez asked ·

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 ·

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.