Log cksum prev - #6138
Conversation
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
cdb2api_rollback_rc [failed with core dumped]
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
log_cksum_prev
diskspace_nollmeta
diskspace_nollmeta_nostripe_generated
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
0a1e39c to
5b57ebf
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
analyze_exit_immediately [failed with core dumped]
cdb2api_rollback_rc [failed with core dumped]
cdb2jdbc
diskspace_nollmeta_nostripe_generated
diskspace_nollmeta
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
cdb2api_rollback_rc [failed with core dumped]
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
consumer_non_atomic_default_consumer_generated **quarantined**
manual_partition
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
sql_logfill_autodisable [timeout]
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
cdb2api_rollback_rc [failed with core dumped]
cdb2jdbc
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
46cfbfd to
7f10ca4
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
cdb2api_rollback_rc [failed with core dumped]
cdb2jdbc
sp_snapshot_generated
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
analyze_exit_immediately [failed with core dumped]
cdb2api_rollback_rc [failed with core dumped]
sc_resume_logicalsc_generated **quarantined**
cdb2jdbc
comdb2sys_pagesize_generated
consumer_non_atomic_default_consumer_generated **quarantined**
bind_query_plan
sc_downgrade [timeout] **quarantined**
7f10ca4 to
09cbcfd
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
yast
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
97a2290 to
b7aa972
Compare
Performance: log_cksum_prev vs mainBenchmarked Result: no measurable throughput or latency regression. The feature's real WorkloadsTable:
Single node (median of 3 runs, seconds; lower is better)
3-node cluster (mean of 2 runs, seconds)
Notes
|
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
bind_query_plan
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
b7aa972 to
573f1db
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Success ✓.
Regression testing: Success ✓.
The first 10 failing tests are:
osql_cleanup [failed with core dumped]
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
truncatesc_offline_generated [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
573f1db to
0f62fbf
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
consumer_non_atomic_default_consumer_generated **quarantined**
sc_downgrade [timeout] **quarantined**
diskspace_nollmeta compared 'stat size' output verbatim, including the N% share each table holds of total space. That denominator counts the log files, so the ratio moves whenever the log format changes and the test fails for reasons that have nothing to do with table sizing. Strip the percentage and compare sizes only. Signed-off-by: Mark Hannum <[email protected]>
Rectype tags (ufid +1000, utxnid +2000) were decoded by open-coded range tests in ten files, each correct only for the tags that existed when it was written. Replace them with one decomposition. No behaviour change: normalize_rectype() agrees with the old version on every live rectype. Signed-off-by: Mark Hannum <[email protected]>
Will gate writing the previous log record's checksum into each record. Nothing reads it yet. READEARLY like utxnid_log, since a log-format tunable must be settled before the log opens. Off under legacy_defaults. Signed-off-by: Mark Hannum <[email protected]>
Adds rectype tag +4000: the record carries a u_int32_t prev_cksum after the utxnid in its common prefix. Reserved as zero here; the value is not known until the log region lock is held. In the prefix rather than at the end because generated readers get a recbuf with no length and can only parse forward. txn_auto.c tag tests move off "== DB___x + 2000", which the new tag breaks. Signed-off-by: Mark Hannum <[email protected]>
prev_cksum widens the common prefix, so hand-computed "4 + 4 + 8 + (utxnid_logged ? 8 : 0)" offsets are short by four bytes. Walking the prefix field by field was worse: it steps over only the fields it knows, so a new one is skipped silently -- __lc_cache_feed() lost prev_cksum that way. Consumers now read fixed fields at DB_REC_OFF_* and reach the body via __rectype_prefix_len(). Also fixes __log_put_next() reading __txn_dist_commit's generation at 4+4+8+4, which landed in the utxnid tail. Signed-off-by: Mark Hannum <[email protected]>
__log_put_next() stamps lp->last_cksum into the reserved field under the region lock; __log_putr() then advances it. Both dbt (our log) and udbt (what a master ships) are stamped. lp->last_cksum is in-memory only, re-derived by __log_recover() and __log_vtruncate() from the last real record at or before their position, crossing into the previous file when needed. LOGP headers carry log_size, which may differ between nodes, so they stay out of the chain. Also exposes prevcksum/cksum on comdb2_transaction_logs, and adds the record generator to llog_auto.c's CMake DEPENDS. Signed-off-by: Mark Hannum <[email protected]>
A chained record's checksum transitively covers the whole log prefix, so matching it byte-for-byte at the same LSN implies identical history -- the guarantee the commit-only rule provided. Decided from the record's own tag, so an unchained source falls back to commit-only. DB___txn_ckp_recovery stays excluded, and is never used for a generation: recovering a copy emits one above the cluster's generation. A non-commit anchor carries no generation, so find_match_lsn() asks the source for the one in effect there -- passing maxlsn as well as minlsn, or the vtab scans from the end of the log. A missing generation is only a bad logstream if the record should have carried one. Signed-off-by: Mark Hannum <[email protected]>
Checks each record's prevcksum against the previous record's cksum, in steady state, across a log file rollover, and across a bounce. pushlogs is asynchronous and master-only, so the rollover is polled for rather than assumed. Every node is flushed at the end: a flush that hangs is itself a bug, and failing here beats letting the harness's own silent flush time out and blame the datafiles. Signed-off-by: Mark Hannum <[email protected]>
0f62fbf to
2297c47
Compare
roborivers
left a comment
There was a problem hiding this comment.
Cbuild submission: Error ⚠.
Regression testing: Success ✓.
The first 10 failing tests are:
ssl_san
consumer_non_atomic_default_consumer_generated **quarantined**
ssl_set_cmd
ssl_prefer
ssl_dbname
sc_downgrade [timeout] **quarantined**
reco-ddlk-sql [timeout] **quarantined**
.