Commit Graph

27624 Commits

Author SHA1 Message Date
Neil Macneale IV 445973eaf8 PR Feedback 2025-08-26 14:14:43 -07:00
Neil Macneale IV 9097545d96 Update go/store/nbs/archive_reader.go
Co-authored-by: Aaron Son <aaron@dolthub.com>
2025-08-26 11:26:22 -07:00
Neil Macneale IV fd1ab8acb1 Update go/store/nbs/archive_writer.go
Co-authored-by: Aaron Son <aaron@dolthub.com>
2025-08-26 11:24:51 -07:00
macneale4 db7667d272 [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2025-08-26 01:19:43 +00:00
Neil Macneale IV fd9c8a74fa Fix import 2025-08-25 18:10:59 -07:00
Neil Macneale IV fd17c81ddc Use correct type when reading table indexes 2025-08-25 18:00:36 -07:00
macneale4 a4e5780a25 [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2025-08-25 23:52:00 +00:00
Neil Macneale IV 5d6fbf7e26 Update gc_oldgen_conjoin_test to be archive aware 2025-08-25 16:39:07 -07:00
Neil Macneale IV f3d2b9052f Fix building largest tables first.
Also address several todos.
2025-08-25 16:33:04 -07:00
Neil Macneale IV 5141526baf Conjoining table files into archive files works now 2025-08-25 16:33:04 -07:00
macneale4 27001b2c4b [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2025-08-25 16:33:04 -07:00
Neil Macneale IV bc19fb81b8 Simplify local file conjoin and consolidate index calculation for archives 2025-08-25 16:33:04 -07:00
Neil Macneale IV 313939aa27 Don't finalize byte spans twice 2025-08-25 16:33:04 -07:00
Neil Macneale IV 245f14317f Bug fix. properly determine index data len 2025-08-25 16:33:04 -07:00
Neil Macneale IV 3cb92f816f more fix up 2025-08-25 16:33:04 -07:00
Neil Macneale IV bc588a3f21 Create and archive chunk source when conjoining archives 2025-08-25 16:33:04 -07:00
Neil Macneale IV f9c3d81218 Correctly copy the byte buffer for the archive index 2025-08-25 16:33:04 -07:00
Neil Macneale IV 57d43201fa BREAK ME UP 2025-08-25 16:33:04 -07:00
Neil Macneale IV 36e5979294 Add support for conjoining archive files in dolt admin conjoin
This change enables the `dolt admin conjoin` command to work with archive
files (.darc) as targets, in addition to regular table files.

Key changes:
- Enhanced findTableSpec() in store.go to detect archive files by attempting
  to open them through the persister
- Modified ConjoinAll() in file_table_persister.go to detect when all sources
  are archive chunk sources and branch to archive-specific logic
- Added conjoinArchives() method that leverages the clean conjoinAll() method
  from archive_writer.go
- Added comprehensive test coverage in admin-conjoin.bats

The implementation follows the principle of using the well-factored archive
conjoin logic rather than exposing archive internals through the messy table
file conjoin approach.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV f5cbfe9310 Remove unnecesary sort of table files 2025-08-25 16:33:04 -07:00
Neil Macneale IV 17416db69b Enhance comprehensive conjoin test with exact validation and iteration verification
Added precise chunk count verification and comprehensive iteration testing:
- Replaced approximate assertions with exact chunk count verification
- Added iteration testing to verify each chunk ref is visited exactly once
- Verify duplicate chunks appear the correct number of times during iteration
- Ensure total iteration count equals chunk count for complete validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV 9de589b76f Add comprehensive archive conjoin test with nested operations
Added TestArchiveConjoinAllComprehensive that tests complex scenarios:
- 10 initial archives with mixed compression and chunk sizes (10-250 bytes)
- Shared chunks duplicated across archives with mixed Snappy/zStd compression
- Nested conjoin operations (first conjoin 10 archives, then conjoin result with 3 more)
- Single validation loop testing all expected chunks and hashes
- Proper buffer sizing to handle large amounts of data

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV 5d11806552 Apply DRY principle to archive test helpers
Enhanced createTestArchiveWithHashes to support mixed compression types
and consolidated duplicate archive creation code. Fixed variable shadowing
issue where 'chunks' parameter was shadowing the chunks package name.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV a344ad189d Consolidate duplicate archive creation logic in tests
- Refactor createTestArchive to delegate to createTestArchiveWithHashes
- Remove ~35 lines of duplicate archive creation code
- Maintain same functionality with cleaner test helper hierarchy
- All tests continue to pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV b70f4f9589 Refactor duplicate hash reconstruction into helper function
- Add reconstructHashFromPrefixAndSuffix helper function in archive_reader.go
- Update archive_writer.go to use the helper function
- Remove duplicate hash reconstruction logic while maintaining functionality
- All tests continue to pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV 51cc4b692e Allow duplicate chunks in conjoinAll method
- Update conjoinAll to allow duplicate chunks instead of erroring
- Each chunk gets its own index entry pointing to its actual data location
- Enhanced TestArchiveConjoinAllDuplicateChunk with more comprehensive test cases
- Validate that duplicate chunks appear twice in the index as expected
- Maintain performance by writing entire data blocks from each archive

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV a1465d579a Add TestArchiveConjoinAllDuplicateChunk with helper functions for future duplicate handling
- Add TestArchiveConjoinAllDuplicateChunk test that expects successful deduplication
- Create createTestArchiveWithHashes helper for precise hash control
- Create createArchiveWithDuplicates helper for mixed duplicate/unique scenarios
- Test verifies combined archive contains all expected chunks after deduplication
- Currently fails as expected since conjoinAll errors on duplicates
- Test is correctly structured for future implementation of duplicate handling

The helper functions will enable easy expansion to 10+ archives with complex duplicate patterns.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV 998e5c5aca Test clean up 2025-08-25 16:33:04 -07:00
Neil Macneale IV 0b96e0b37b Update conjoinAll to use indexFinalize instead of file persistence
- Change conjoinAll return type from (archiveReader, error) to just error
- Replace indexFinalizeFlushArchive with indexFinalize for in-memory completion
- Remove file persistence logic to make method suitable for unit testing
- Update test to create archive reader from in-memory bytes using provided pattern
- Add documentation clarifying the method completes archive writing in memory only

This makes conjoinAll more appropriate for unit tests that don't need disk materialization.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV 43e6127ea7 Implement conjoinAll method for archiveWriter with file-based persistence
- Add full implementation of conjoinAll method that merges multiple archive readers
- Includes context parameter, data span sorting, and memory-efficient io.Copy
- Uses indexFinalizeFlushArchive for proper archive finalization and file persistence
- Fix createTestArchive to properly compress chunk data before writing byte spans
- Remove redundant readerAtAdapter type in favor of existing readerAtWithStatsBridge
- All tests pass including new TestArchiveConjoinAll validation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Neil Macneale IV 4debebe3f0 Add conjoinAll method stub and test for archiveWriter
Added conjoinAll method to archiveWriter that takes multiple archiveReader instances
and combines them into a single archive. The method currently returns a stub
implementation with proper validation and error handling.

Added comprehensive test that validates the expected behavior:
- Creates two test archives with different chunk prefixes
- Tests that combined reader contains all chunks from both archives
- Verifies data integrity is maintained through the conjunction process
- Includes helper function to reduce test code duplication

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-25 16:33:04 -07:00
Elian 56a05a3694 Merge pull request #9728 from dolthub/elian/9725
dolthub/dolt#9725 - Fix AUTO_INCREMENT reuse after HA failover by refreshing trackers
2025-08-25 15:31:04 -07:00
Jason Fulghum e8faa087d2 Merge pull request #9729 from dolthub/fulghum-58933077
[auto-bump] [no-release-notes] dependency by fulghum
2025-08-25 14:26:57 -07:00
elianddb e1a9cb3204 amend select query in repro 2025-08-25 21:21:43 +00:00
Jason Fulghum 5d560b1a0b Updating SHOW VARIABLES result processing, now that SHOW VARIABLES returns booleans as ON/OFF instead of 1/0 2025-08-25 13:43:45 -07:00
fulghum 1d2f7edcfa [ga-bump-dep] Bump dependency in Dolt by fulghum 2025-08-25 19:31:53 +00:00
elianddb 9904a099da add impl to update AI trackers for curr sess 2025-08-25 19:17:46 +00:00
elianddb f3c9b49630 Add repro for AUTO_INCREMENT not syncing on failover (cluster suite)
Integrates failing test into existing sql-server-cluster.yaml and removes standalone files. Implements fix: refresh AUTO_INCREMENT trackers on primary promotion to align with replicated data, preventing duplicate key errors post-failover. Adds debug logs (enable logrus debug to view). Prepares ground for resolving #9725.
2025-08-25 17:26:26 +00:00
angelamayxie a687e0a226 Merge pull request #9724 from dolthub/angelamayxie-4a6f3fbe
[auto-bump] [no-release-notes] dependency by angelamayxie
2025-08-22 20:03:27 -07:00
angelamayxie bbfd1a0825 [ga-bump-dep] Bump dependency in Dolt by angelamayxie 2025-08-22 23:37:01 +00:00
angelamayxie dd35ab2cf3 Merge pull request #9723 from dolthub/angelamayxie-a3694582
[auto-bump] [no-release-notes] dependency by angelamayxie
2025-08-22 14:01:32 -07:00
angelamayxie a680fbfb0f [ga-bump-dep] Bump dependency in Dolt by angelamayxie 2025-08-22 20:20:16 +00:00
Neil Macneale IV 3add881e2a Merge pull request #9720 from dolthub/macneale4/conjoin-prep
[no-release-notes] conjoin prep
2025-08-22 11:09:04 -07:00
Neil Macneale IV 03d7fac6b0 PR Feedback 2025-08-22 09:45:26 -07:00
Nathan Gabrielson 14be165234 Merge pull request #9678 from dolthub/nathan/doltUnitTesting
dolt_tests system table
2025-08-21 14:33:45 -07:00
James Cor 01775bc5cb disable only_full_group_by in sysbench (#9721) 2025-08-21 14:26:45 -07:00
Nathan Gabrielson 955775a90d Primary key should be first 2025-08-21 13:10:27 -07:00
Nathan Gabrielson c0249ffe6a Small change 2025-08-21 13:04:16 -07:00
macneale4 5f13c72903 [ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh 2025-08-21 19:12:24 +00:00
Neil Macneale IV 650241391c writeCheckSums rename to make more purpose more clear 2025-08-21 11:56:50 -07:00