-
Notifications
You must be signed in to change notification settings - Fork 207
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
fix: manifest delta num may overflow #1616
Conversation
1d7435e
to
9358266
Compare
} | ||
|
||
pub fn into_bytes(self) -> Result<Bytes> { | ||
let buf = Vec::with_capacity(self.header.length as usize + SnapshotHeader::LENGTH); | ||
let buf = Vec::with_capacity(self.header.length as usize * SnapshotHeader::LENGTH); |
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.
self.header.length as usize + SnapshotHeader::LENGTH is right ?
self.header.length is the total length of the payload of Snapshot in bytes.
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.
Good catch!
"When manifest merge_update, since the deltas is unsorted, so we may first delete a non-existing file." Why is the failure to delete related to the sorting of the deltas? Intuitively they are mutually irrelevent with each other. |
@@ -52,6 +62,16 @@ async fn hello() -> impl Responder { | |||
HttpResponse::Ok().body("Hello world!") | |||
} | |||
|
|||
#[get("/toggle")] | |||
async fn toggle(data: web::Data<AppState>) -> impl Responder { |
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.
Any reasons for choosing Actix over Axum?
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.
No specific reason. GPT says actix is more feature-rich.
This is a tricky bug. For example, we have two delta files to merge:
If the delta files are unsorted, when we first merge |
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.
LGTM
Rationale
Fix bugs found in local write bench.
Detailed Changes
Test Plan
CI