Skip to content

feat: Add Solparq - #55

Merged
notwedtm merged 75 commits into
mainfrom
solparq-initial
Jul 28, 2026
Merged

feat: Add Solparq#55
notwedtm merged 75 commits into
mainfrom
solparq-initial

Conversation

@picard8472

Copy link
Copy Markdown
Contributor

This pull request adds the new superbank-solparq package to the workspace, which provides Parquet archiving and reading capabilities for Superbank ClickHouse tables. It updates project documentation, build configuration, and CI to support the new binaries and their release process, and introduces a set of engineering guidelines for the new package.

Major additions and changes:

1. New Parquet archiver and reader package

  • Added crates/superbank-solparq to the workspace, which builds two binaries: superbank-solparq (the archiver daemon) and superbank-solparq-read (Parquet archive reader). The package includes its own Cargo.toml, a build.rs for embedding version/git info, and a dedicated AGENTS.md with engineering rules. [1] [2] [3] [4]

2. Build and release pipeline updates

  • Updated .goreleaser.yaml to build, package, and archive the new superbank-solparq and superbank-solparq-read binaries for both x86_64 and aarch64 Linux. [1] [2]
  • Modified .github/workflows/build-binaries.yml to upload the new binaries as artifacts, and updated release workflow to exclude certain tags. [1] [2]

3. Documentation and project structure

  • Updated README.md and AGENTS.md to document the new package, its binaries, and usage (including restore and inspection of Parquet archives). Also updated development/build instructions and repository layout. [1] [2] [3] [4] [5] [6] [7]
  • Updated workspace membership and default members in Cargo.toml to include the new package.

These changes collectively introduce Parquet archive support to Superbank, improve developer workflow, and ensure the new functionality is documented and included in builds and releases.

picard8472 and others added 30 commits June 22, 2026 15:06
… archives

- Implemented CLI structure using Clap for commands: list, summary, schema, and scan.
- Added configuration and argument parsing for local and S3 archive sources.
- Developed functionality to summarize archives, output schemas, and scan for transaction rows.
- Introduced output formatting for JSON, JSONL, and CSV.
- Created tests for CLI argument validation and archive operations.
- Updated README with usage instructions for the new solparq-read tool.
…pport

- Added support for new archive tables: entries, gsfa_hot, and token_owner_activity.
- Introduced ArchiveManifest and ArchiveManifestTable for better tracking of archived data.
- Updated DbTables to include new tables and their configurations.
- Enhanced the ClickHouse client to handle streaming and counting rows for new tables.
- Implemented logic to create and write manifests for local and S3 archive locations.
- Improved error handling and logging for table checks and archiving processes.
- Updated tests to cover new functionality and ensure proper integration of new tables.
…anagement

- Changed the naming convention of the done marker files to include a .txt extension.
- Improved the logic for handling existing archive bundles without done markers, ensuring they are removed before recreating the archive.
- Introduced a new ArchiveRunTable struct to encapsulate details about archive tables in the ArchiveRunReport.
- Enhanced the dashboard rendering to include a list of detected archive tables.
- Added tests for the new functionality, including the removal of incomplete archive bundles and rendering of S3 output locations.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Added a comprehensive set of metrics to track the health and performance of the archiving process, including gauges, counters, and histograms.
- Introduced new structs for labeling metrics based on archive kind, validation categories, and known gaps.
- Implemented methods to observe and export metrics, ensuring they are updated during archive operations.
- Enhanced the AppState struct to maintain metrics and health status, allowing for better monitoring and diagnostics.
- Updated the server to expose metrics in the OpenMetrics format and improved health check responses.
- Added tests to validate the metrics endpoint and ensure correct behavior across various scenarios, including error handling and archive skips.
- Added functionality to repair overcount transaction mismatches in ClickHouse via deduplication of partitions.
- Introduced `MismatchRepair` struct to track repair outcomes, including optimized partitions and slot counts before and after repair.
- Enhanced `ValidationReport` to categorize transaction mismatches into undercount and overcount ranges.
- Updated metrics to expose counts of mismatched slots and repair outcomes for monitoring.
- Modified configuration to allow enabling mismatch repair and specify local transaction tables for clustered deployments.
- Added tests to validate the new mismatch direction logic and ensure metrics are correctly reported.
- Added `--dry-run` flag to allow planning and validating archives without making any changes.
- Implemented logic to skip ClickHouse deletions and archive cleanups during dry runs.
- Enhanced reporting to indicate when an archive would be created without actual file writes.
- Updated metrics to classify dry run skips and prevent inflating row counters.
- Introduced build identity metrics to expose version and git SHA in the dashboard and metrics endpoint.
- Updated README and documentation to reflect new dry run functionality and build info.
@picard8472
picard8472 requested a review from notwedtm July 17, 2026 09:50
@picard8472 picard8472 changed the title Add Solparq feat: Add Solparq Jul 17, 2026

@Mctursh Mctursh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through this focused on the data paths (archive, restore, delete). The structure is clean and the local staging + done-marker resume is nice. Three things I'd want fixed before merge, all on the S3 and delete side. Left them inline.

  1. --delete-archived-data-range can delete slots that were never archived.
  2. The S3 restore matches columns by position while the local restore matches by name, so S3 can silently mis-column on schema drift.
  3. A failed S3 export logs the query, and the query has the S3 access key and secret in it.

Rest of the crate read solid, so these are pretty contained.

Comment thread crates/superbank-solparq/src/archive.rs
Comment thread crates/superbank/src/ingest/solparq.rs
Comment thread crates/superbank-solparq/src/clickhouse.rs
@picard8472

Copy link
Copy Markdown
Contributor Author

Went through this focused on the data paths (archive, restore, delete). The structure is clean and the local staging + done-marker resume is nice. Three things I'd want fixed before merge, all on the S3 and delete side. Left them inline.

  1. --delete-archived-data-range can delete slots that were never archived.
  2. The S3 restore matches columns by position while the local restore matches by name, so S3 can silently mis-column on schema drift.
  3. A failed S3 export logs the query, and the query has the S3 access key and secret in it.

Rest of the crate read solid, so these are pretty contained.

Hey thanks for the feedback, I'll review and include, thanks.

@notwedtm notwedtm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@notwedtm

Copy link
Copy Markdown
Contributor

@Mctursh your comments are valid, but we're going to push a separate PR for them so we can address them without blocking this.

We'll make sure they get in to v0.6.0!

@notwedtm
notwedtm added this pull request to the merge queue Jul 28, 2026
Merged via the queue into main with commit ede04e1 Jul 28, 2026
7 checks passed
@notwedtm
notwedtm deleted the solparq-initial branch July 28, 2026 03:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants