MENT-2297: Inconsistency detected - create sequence #506
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue:
The Create SEQUENCE object on the first/active galera node:
CREATE SEQUENCE
seq_moni_num
start with 1 minvalue 1 maxvalue 9223372036854775806 increment by 0 cache 1000 nocycle ENGINE=InnoDBExecute the following query for two or three times on the other nodes:
SELECT NEXT VALUE FOR seq_moni_num;
Resulted in below error on applier node:
[ERROR] Slave SQL: Could not execute Write_rows_v1 event on table monitor.seq_moni_num; Unknown error, Error_code: 1105; handler error No Error!; the event's master log FIRST, end_log_pos 0, Internal MariaDB error code: 1105 [Warning] WSREP: Event 3 Write_rows_v1 apply failed: 195, seqno 28222
Solution:
The error HA_ERR_SEQUENCE_INVALID_DATA 195 happens in sequence_definition::check_and_adjust() but not enough log are provided to know which limit reached or condition failed. So more logs are added on failure in sequence_definition::check_and_adjust().