Compare commits

..

38 Commits

Author SHA1 Message Date
Vitaliy Filippov 02a6322556 Move KV FS header into a separate file
Test / test_move_reappear (push) Has been cancelled Details
Test / test_rm (push) Has been cancelled Details
Test / test_snapshot_chain (push) Has been cancelled Details
Test / test_snapshot_chain_ec (push) Has been cancelled Details
Test / test_snapshot_down (push) Has been cancelled Details
Test / test_snapshot_down_ec (push) Has been cancelled Details
Test / test_splitbrain (push) Has been cancelled Details
Test / test_rebalance_verify (push) Has been cancelled Details
Test / test_rebalance_verify_imm (push) Has been cancelled Details
Test / buildenv (push) Has been cancelled Details
Test / test_rebalance_verify_ec (push) Has been cancelled Details
Test / test_rebalance_verify_ec_imm (push) Has been cancelled Details
Test / test_switch_primary (push) Has been cancelled Details
Test / test_write (push) Has been cancelled Details
Test / test_write_xor (push) Has been cancelled Details
Test / test_write_no_same (push) Has been cancelled Details
Test / test_heal_pg_size_2 (push) Has been cancelled Details
Test / test_heal_ec (push) Has been cancelled Details
Test / test_heal_csum_32k_dmj (push) Has been cancelled Details
Test / test_heal_csum_32k_dj (push) Has been cancelled Details
Test / test_heal_csum_32k (push) Has been cancelled Details
Test / test_heal_csum_4k_dmj (push) Has been cancelled Details
Test / test_heal_csum_4k_dj (push) Has been cancelled Details
Test / test_heal_csum_4k (push) Has been cancelled Details
Test / test_scrub (push) Has been cancelled Details
Test / test_scrub_zero_osd_2 (push) Has been cancelled Details
Test / test_scrub_xor (push) Has been cancelled Details
Test / test_scrub_pg_size_3 (push) Has been cancelled Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Has been cancelled Details
Test / test_scrub_ec (push) Has been cancelled Details
2024-02-03 20:37:45 +03:00
Vitaliy Filippov d809a8ecf2 Implement packing small files into shared inodes 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 4dbf93fdbd Split new NFS proxy implementation into multiple files 2024-02-03 20:37:45 +03:00
Vitaliy Filippov db6dc8f690 WIP VitastorFS with metadata storage in VitastorKV 2024-02-03 20:37:45 +03:00
Vitaliy Filippov f5753a52b9 Fix eviction when random_pos selects the end
Test / test_move_reappear (push) Has been cancelled Details
Test / test_rm (push) Has been cancelled Details
Test / test_snapshot_chain (push) Has been cancelled Details
Test / test_snapshot_chain_ec (push) Has been cancelled Details
Test / test_snapshot_down (push) Has been cancelled Details
Test / test_snapshot_down_ec (push) Has been cancelled Details
Test / test_splitbrain (push) Has been cancelled Details
Test / test_rebalance_verify (push) Has been cancelled Details
Test / test_rebalance_verify_imm (push) Has been cancelled Details
Test / test_rebalance_verify_ec (push) Has been cancelled Details
Test / test_rebalance_verify_ec_imm (push) Has been cancelled Details
Test / test_switch_primary (push) Has been cancelled Details
Test / test_write (push) Has been cancelled Details
Test / test_write_xor (push) Has been cancelled Details
Test / test_write_no_same (push) Has been cancelled Details
Test / test_heal_pg_size_2 (push) Has been cancelled Details
Test / test_heal_ec (push) Has been cancelled Details
Test / test_heal_csum_32k_dmj (push) Has been cancelled Details
Test / test_heal_csum_32k_dj (push) Has been cancelled Details
Test / test_heal_csum_32k (push) Has been cancelled Details
Test / test_heal_csum_4k_dmj (push) Has been cancelled Details
Test / test_heal_csum_4k_dj (push) Has been cancelled Details
Test / test_heal_csum_4k (push) Has been cancelled Details
Test / test_scrub (push) Has been cancelled Details
Test / test_scrub_zero_osd_2 (push) Has been cancelled Details
Test / test_scrub_xor (push) Has been cancelled Details
Test / test_scrub_pg_size_3 (push) Has been cancelled Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Has been cancelled Details
Test / test_scrub_ec (push) Has been cancelled Details
Test / buildenv (push) Has been cancelled Details
2024-02-03 20:37:45 +03:00
Vitaliy Filippov feae754e6a Implement min/max list_count to make listings during performance test reasonable 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 08d9735efe Fix and improve parallel allocation
- Do not try to allocate more DB blocks in an inode block until it's "confirmed" and "locked" by the first write
- Do not recheck for new zero DB blocks on first write into an inode block - a CAS failure means someone else is already writing into it
- Throw new allocation blocks away regardless of whether the known_version is 0 on a CAS failure
2024-02-03 20:37:45 +03:00
Vitaliy Filippov 90e2c4ed2c Implement key_prefix for K/V stress test 2024-02-03 20:37:45 +03:00
Vitaliy Filippov c3f19f0add More fixes
- do not overwrite a block with older version if known version is newer
  (read may start before update and end after update)
- invalidated block versions can't be remembered and trusted
- right boundary for split blocks is right_half when diving down, not key_lt
- restart update also when block is "invalidated", not just on version mismatch
- copy callback in listings to avoid closure destruction bugs too
2024-02-03 20:37:45 +03:00
Vitaliy Filippov c38eb44415 Add logging and one more assert 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 8ad61a8c9a Make get_block() wait for updating when unrelated block is found along the path 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 77b06bf72f Fix a race condition where changed blocks were parsed over existing cached blocks and getting a mix of data 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 3bcd42a7b4 Simplify code by removing an unneeded "optimisation" 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 0042384517 Add kv_log_level, print warnings on level 1, trace ops on level 10 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 94ca965de7 Fix duplicate keys in listings on parallel updates -- do not rewind key "iterator position" 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 94e8a5437f Implement key suffix to avoid collisions of multiple test workers 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 3991a632be Do not complain on empty first block 2024-02-03 20:37:45 +03:00
Vitaliy Filippov b9868504de Add JSON output for stress-tester 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 777cee65da Print total stats 2024-02-03 20:37:45 +03:00
Vitaliy Filippov b22580e28d Do not send more than op_count operations (fix segfault on finish) 2024-02-03 20:37:45 +03:00
Vitaliy Filippov c75244c369 Add some more resiliency to serialize() 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 92d87cd244 Invalidate blocks being updated too 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 6543afa2ed Change new block allocation method: make each writer choose multiple empty PG blocks and place blocks in them 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 7a4e19215d Remove blocks from cache on unsuccessful updates 2024-02-03 20:37:45 +03:00
Vitaliy Filippov f2f85df200 Allow to track multiple updates per block (it should never happen though) 2024-02-03 20:37:45 +03:00
Vitaliy Filippov f7444e717d Do not call stop_updating after failed write_new_block and after clear_block (both delete the item) 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 9aba5373bb Track versions of parent blocks and recheck if changed during update 2024-02-03 20:37:45 +03:00
Vitaliy Filippov f4b85900b7 Fix resume_split condition (key_lt can also be "") 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 38e5a94feb Experiment: transform offsets for better sharding 2024-02-03 20:37:45 +03:00
Vitaliy Filippov e63d59798c More post-stress-test fixes
- Prevent _split types of new blocks
- Stop updating new blocks only after the whole update, otherwise pointers
  may become invalid
- Use recheck_none for updates initially
- Use UINT64_MAX as initial block version when postponing ops, otherwise the
  check fails when the block is initially empty. This for example leads to
  writing both leaf items & block pointers (which is incorrect) into the root
  block when starting stress-test with --parallelism 32
- Fix -EINTR comparison
2024-02-03 20:37:45 +03:00
Vitaliy Filippov a476af5bb6 Print operation statistics 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 07e8bece9b K/V fixes after stress-test :-)
- track block versions correctly - per inode block (128kb) instead of tree block (4kb)
- prevent multiple parallel CAS writes of the same inode block
- add logging for EILSEQ which means invalid data in the tree
- fix get_block updated flag which was true for blocks already in cache and was leading to infinite loops on "unrelated block" errors
- apply changes to blocks in cache only after successful writes (using "virtual changes")
- do not replace cached block with an older version from disk
- recheck "unrelated blocks" (read/update collisions) until data stops changing
- track tree path correctly - do not treat split block as parent of its right half
- correctly move blocks when finding new empty place on disk
- restart updates from the beginning when one of blocks is changed by a parallel update
- fix delete using SET opcode and setting key to the empty value instead
- prevent changing the same key more than 1 time in parallel
- fix listing verification
- resume continue_updates in update_find (required because it uses continue_update itself)
- add allow_old_cached parameter to get()
2024-02-03 20:37:45 +03:00
Vitaliy Filippov 83ba4b8277 Implement K/V DB stress tester 2024-02-03 20:37:45 +03:00
Vitaliy Filippov ff40b5da50 Evict blocks based on memory limit & block usage 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 114db95c55 Track blocks per level 2024-02-03 20:37:45 +03:00
Vitaliy Filippov c51bf90d34 Track block level 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 30686933ed Experimental B-Tree Vitastor embedded K/V database implementation! 2024-02-03 20:37:45 +03:00
Vitaliy Filippov 77c10fd1f8 In fact, do not autosync blockstore when autosync_writes=0
Test / test_move_reappear (push) Successful in 19s Details
Test / test_rm (push) Successful in 14s Details
Test / test_snapshot_down (push) Successful in 24s Details
Test / test_snapshot_down_ec (push) Successful in 25s Details
Test / test_splitbrain (push) Successful in 17s Details
Test / test_snapshot_chain (push) Successful in 1m57s Details
Test / test_snapshot_chain_ec (push) Successful in 2m41s Details
Test / test_rebalance_verify (push) Successful in 3m5s Details
Test / test_rebalance_verify_imm (push) Successful in 2m26s Details
Test / test_switch_primary (push) Successful in 45s Details
Test / test_write (push) Successful in 33s Details
Test / test_write_xor (push) Successful in 33s Details
Test / test_rebalance_verify_ec (push) Successful in 3m42s Details
Test / test_write_no_same (push) Successful in 14s Details
Test / test_rebalance_verify_ec_imm (push) Successful in 4m57s Details
Test / test_heal_csum_32k_dmj (push) Successful in 4m24s Details
Test / test_heal_csum_32k_dj (push) Successful in 4m29s Details
Test / test_heal_csum_4k_dmj (push) Successful in 5m10s Details
Test / test_heal_csum_32k (push) Successful in 5m13s Details
Test / test_scrub (push) Successful in 1m5s Details
Test / test_scrub_zero_osd_2 (push) Successful in 1m1s Details
Test / test_scrub_xor (push) Successful in 1m2s Details
Test / test_heal_csum_4k_dj (push) Successful in 5m2s Details
Test / test_scrub_pg_size_6_pg_minsize_4_osd_count_6_ec (push) Successful in 57s Details
Test / test_scrub_ec (push) Successful in 50s Details
Test / test_scrub_pg_size_3 (push) Successful in 2m1s Details
Test / test_heal_csum_4k (push) Successful in 4m40s Details
Test / test_interrupted_rebalance (push) Successful in 1m38s Details
Test / test_heal_pg_size_2 (push) Successful in 4m2s Details
Test / test_heal_ec (push) Successful in 5m17s Details
2024-02-03 20:37:36 +03:00
1 changed files with 1 additions and 1 deletions

View File

@ -129,7 +129,7 @@ bool blockstore_impl_t::enqueue_write(blockstore_op_t *op)
} }
bool imm = (op->len < dsk.data_block_size ? (immediate_commit != IMMEDIATE_NONE) : (immediate_commit == IMMEDIATE_ALL)); bool imm = (op->len < dsk.data_block_size ? (immediate_commit != IMMEDIATE_NONE) : (immediate_commit == IMMEDIATE_ALL));
if (wait_big && !is_del && !deleted && op->len < dsk.data_block_size && !imm || if (wait_big && !is_del && !deleted && op->len < dsk.data_block_size && !imm ||
!imm && unsynced_queued_ops >= autosync_writes) !imm && autosync_writes && unsynced_queued_ops >= autosync_writes)
{ {
// Issue an additional sync so that the previous big write can reach the journal // Issue an additional sync so that the previous big write can reach the journal
blockstore_op_t *sync_op = new blockstore_op_t; blockstore_op_t *sync_op = new blockstore_op_t;