-
Notifications
You must be signed in to change notification settings - Fork 615
fix(server): avoid loading huge task results for metadata queries #3060
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
Changes from 2 commits
47fb2f9
090a873
fac25d3
9c61302
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -308,8 +308,9 @@ protected <V> HugeTask<V> deleteFromDB(Id id) { | |
| if (vertex == null) { | ||
| return null; | ||
| } | ||
| HugeTask<V> result = HugeTask.fromVertex(vertex); | ||
| this.tx().removeVertex(vertex); | ||
| HugeTask<V> result = HugeTask.fromVertex(vertex, false); | ||
| this.deleteTaskResultFromTx(id); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please make the cleanup expectation explicit here. This path now deletes |
||
| this.tx().removeTaskVertex(vertex); | ||
| return result; | ||
| }); | ||
| } | ||
|
|
@@ -629,7 +630,7 @@ public void run() { | |
| // 1. start task can be from schedule() & cronSchedule() | ||
| // 2. recheck the status of task, in case one same task | ||
| // called by both methods at same time; | ||
| HugeTask<Object> queryTask = task(this.task.id()); | ||
| HugeTask<Object> queryTask = task(this.task.id(), false); | ||
| if (queryTask != null && | ||
| !TaskStatus.NEW.equals(queryTask.status())) { | ||
| return; | ||
|
|
||
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.
Since this introduces a new public query parameter, please update the PR checklist/docs status accordingly, or briefly explain why the generated OpenAPI annotation is sufficient and no user-facing docs are needed.