Conversation
Summary of ChangesHello @kalbasit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a compressed_size column to the chunks table across all supported databases (MySQL, PostgreSQL, SQLite) to track the size of compressed data. The changes include database migrations, schema updates, and regeneration of the Go database access layer code. The implementation is mostly correct, but there is a type inconsistency in the generated Go code for the new compressed_size column. It's defined as int32 in the unified model, while different database backends generate uint32 (MySQL) or int64 (SQLite). This leads to type casting in the wrapper code that could cause data overflow. I've suggested a fix in sqlc.yml to unify the type as uint32, consistent with the existing size column.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #860 +/- ##
=====================================
Coverage 3.96% 3.96%
=====================================
Files 6 6
Lines 429 429
=====================================
Hits 17 17
Misses 409 409
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…tracking The `chunks` table now includes a `compressed_size` column to track the actual size of chunks after compression. This is necessary for accurate space management and decompression planning when using Content-Addressable Storage (CAS) with Content-Defined Chunking (CDC). - Modified existing migrations for MySQL, PostgreSQL, and SQLite to include the `compressed_size` column in the `chunks` table. - Updated database schemas for all backends to reflect the new column. - Regenerated Go database code using `gen-db-wrappers`, which introduced specific row structs for `GetChunksByNarFileID` and `GetOrphanedChunks` queries to handle the updated schema correctly.
a3da67f to
a0ba5be
Compare

The
chunkstable now includes acompressed_sizecolumn to track theactual size of chunks after compression. This is necessary for accurate
space management and decompression planning when using
Content-Addressable Storage (CAS) with Content-Defined Chunking (CDC).
include the
compressed_sizecolumn in thechunkstable.gen-db-wrappers, which introducedspecific row structs for
GetChunksByNarFileIDandGetOrphanedChunksqueries to handle the updated schema correctly.