Managing invalid messages
DSE Advanced Replication strategies for managing invalid messages when replication fails.
During message replication, DSE Advanced Replicates attempts to manipulate the message to ensure successful replication. In some cases, replication might occur with only a subset of the data.
In other cases, replication fails when there are too many differences between the schema on the source cluster and the schema on the destination cluster. For example, schema incompatibilities occur when a column in the destination has a different type than the same column in the source, or a table in the source doesn’t contain all the columns that form the primary key of the same table in the destination.
If a message cannot be replicated, a second transmission will be tried. If replication still fails after that the second try, the message is discarded and removed from the replication log. The replication log on the source cluster stores data in preparation for transmission to the destination cluster.
- SYSTEM_LOG: Log the CQL query and the error message in the system log on the destination.
- CHANNEL_LOG: Store the CQL query and the error message in files in /var/lib/cassandra/advrep/invalid_queries on the destination. This is the default value.
- NONE: Perform no logging.
- keyspace: keyspace name of the invalid query
- table: table name of the invalid query
- destination: destination cluster of the channel
- time_bucket: an hourly time bucket to prevent the database partition from getting too wide
- id: a time based id (timeuuid)
- cql_string: the CQL query string, explicitly specifies the original timestamp by including the USING TIMESTAMP option.
- error_msg: the error message
Invalid messages are inserted by time in the log table.
Procedure
-
To store the CQL query string and error message using a channel log, instead of the default
system log location, specify the invalid_message_log configuration key as CHANNEL_LOG:
dse advrep conf update --invalid_message_log CHANNEL_LOG
-
To store the CQL query string and error message using a system log, instead of the default
channel log location, specify the invalid_message_log configuration key as SYSTEM_LOG:
dse advrep conf update --invalid_message_log SYSTEM_LOG
- To identify the problem, examine the error messages, the CQL query strings, and the schemas of the data on the source and the destination.
- Take appropriate actions to resolve the incompatibility issues.