-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate Bytes
operation value
#552
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## development #552 +/- ##
===============================================
- Coverage 92.50% 92.34% -0.17%
===============================================
Files 105 106 +1
Lines 17932 18027 +95
===============================================
+ Hits 16588 16647 +59
- Misses 1344 1380 +36
☔ View full report in Codecov by Sentry. |
SQLite has |
/// Data field used to store blob_piece_v1 bytes | ||
#[sqlx(default)] | ||
pub data: Option<Vec<u8>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting pattern! I wonder if we have other types there one day as well.
I'd name this column value_bytes
to underline it's origin from an operation field and maybe keep the door open to have other field types as well.
Time to drop support? 😥 Or we use hexadecimal strings for now until we find a better solution anyhow (see my comment below)? |
Did you consider not storing blob pieces values at all in the database and retrieve the bytes from the file instead during replication? https://doc.rust-lang.org/std/io/trait.Seek.html 😎 .. and interesting for writing: https://doc.rust-lang.org/std/io/struct.Cursor.html I don't think it is too hard but also definitely not required for this development period, I've made a ticket here: #553 |
Yeh, this would be ideal. We still store the encoded operation in the db, so we wouldn't actually need to grab the bytes during replication either. Don't know if I want to tackle it right now though but it could be soon 👍 . |
MIGRATED TO: #554
Bytes
in the database in a new "data" column in theoperation_field_v1
table (not supported by Postgres....)Bytes
we look at this column instead of "value"GraphQL
bytes are represented byHexBytesScalar
📋 Checklist
CHANGELOG.md