Skip to content
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

perf: receive done #1428

Merged
merged 2 commits into from
Jul 5, 2024
Merged

perf: receive done #1428

merged 2 commits into from
Jul 5, 2024

Conversation

constwz
Copy link
Contributor

@constwz constwz commented Jun 19, 2024

Description

receice interface idempotent processing

log.CtxErrorw(ctx, "replicate piece unfinished", "task", task)
err = ErrUnfinishedTask
return nil, ErrUnfinishedTask
// If it already have data, skip this check
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you refine the comment?

@@ -114,10 +114,18 @@ func (r *ReceiveModular) HandleDoneReceivePieceTask(ctx context.Context, task ta
log.CtxErrorw(ctx, "failed to get checksum from db", "task", task, "error", err)
return nil, ErrGfSpDBWithDetail("failed to get checksum from db, error: " + err.Error())
}
skipInsertIntegrityMeta := false
Copy link
Collaborator

Choose a reason for hiding this comment

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

please add comment on this newly introduced field

@@ -137,7 +145,7 @@ func (r *ReceiveModular) HandleDoneReceivePieceTask(ctx context.Context, task ta
}

setIntegrityTime := time.Now()
if task.GetObjectInfo().GetIsUpdating() {
if !skipInsertIntegrityMeta && task.GetObjectInfo().GetIsUpdating() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you refine these conditions?

@constwz constwz merged commit c7a88d1 into develop Jul 5, 2024
11 checks passed
@constwz constwz deleted the perf-receive branch July 5, 2024 01:59
This was referenced Jul 22, 2024
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