Skip to content

Commit 3a8ae08

Browse files
markhannumclaude
andcommitted
odh2: enable random odh1/odh2 by default for testing (DO NOT MERGE)
Test-only sub-branch: default to time-based genids + odh2 attr off + randomize_odh2 on, so a plain `make` in tests/ produces a mix of odh1 and odh2 records without a CUSTOMLRLPATH fragment. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Mark Hannum <mhannum@bloomberg.net>
1 parent 72c8062 commit 3a8ae08

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

db/comdb2.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ int gbl_init_single_meta = 1;
382382
int gbl_schedule = 0;
383383

384384
int gbl_init_with_rowlocks = 0;
385-
int gbl_init_with_genid48 = 1;
385+
int gbl_init_with_genid48 = 0; /* TEST BRANCH: time-based genids so odh1 is legal */
386386
int gbl_init_with_odh = 1;
387387
int gbl_init_with_queue_odh = 1;
388388
int gbl_init_with_queue_compr = BDB_COMPRESS_LZ4;
@@ -393,13 +393,13 @@ int gbl_init_with_instant_sc = 1;
393393
* (see legacy_options[] in config.c). It is also forced at write time when the
394394
* db is in genid48 format, regardless of this default (a genid48 record must
395395
* never be odh1, or its insert time would be lost). */
396-
int gbl_init_with_odh2 = 1;
396+
int gbl_init_with_odh2 = 0; /* TEST BRANCH: baseline odh1 so the randomizer has something to flip */
397397
/* Test/debug only: when set, writes randomly UPGRADE records from odh1 to odh2
398398
* (never downgrade) while genids are time-based, so a single table ends up with
399399
* a mix of both header formats. Off in normal operation; enable it to run the
400400
* test suite as an odh1/odh2 coexistence fuzzer. Has no effect under genid48
401401
* (those writes are already forced to odh2). */
402-
int gbl_randomize_odh2 = 0;
402+
int gbl_randomize_odh2 = 1; /* TEST BRANCH: randomly write odh1/odh2 per record */
403403
/* Count of records the randomizer above emitted as odh2 (approximate -- bumped
404404
* without locking; lets a fuzz run confirm coexistence was actually produced). */
405405
int gbl_odh2_random_upgrades = 0;

0 commit comments

Comments
 (0)