-
Notifications
You must be signed in to change notification settings - Fork 0
perf: enable OPcache and Hyperloop B #11
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
base: qa/agent-appwrite-appwrite/pr-11-13487/base
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| opcache.enable=1 | ||
| opcache.enable_cli=1 | ||
| opcache.memory_consumption=384 | ||
| opcache.interned_strings_buffer=32 | ||
| opcache.max_accelerated_files=65536 | ||
| opcache.validate_timestamps=0 | ||
| opcache.save_comments=1 | ||
| opcache.jit=tracing | ||
| opcache.jit_buffer_size=128M |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -355,7 +355,15 @@ public function action( | |
| } | ||
| } | ||
|
|
||
| $chunksUploaded = max($uploaded, $chunksUploaded, (int) ($metadata['chunks'] ?? 0)); | ||
| // Another chunk may have finalized the upload and removed its parts | ||
|
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. Shipwright · CRITICAL The new guard 'if (empty($chunksUploaded))' is placed before '$chunksUploaded' is assigned in the chunked-upload path. Impact: The new guard 'if (empty($chunksUploaded))' is placed before '$chunksUploaded' is assigned in the chunked-upload path. In the original code, '$chunksUploaded' was initialized from 'max($uploaded, $chunksUploaded, (int) ($metadata['chunks'] ?? 0))' before any check. The diff removes that initialization and instead checks 'empty($chunksUploaded)' first, so on the first chunk '$chunksUploaded' is still null/0 and the r… Suggested fix: Fix the review finding before release. |
||
| // before upload() counted them. Check the completed document above first. | ||
| if (empty($chunksUploaded)) { | ||
| throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed uploading file'); | ||
| } | ||
|
|
||
| // A local chunk file is visible before its write finishes. Only parts | ||
| // recorded after upload() returns are safe to include in finalization. | ||
| $chunksUploaded = max($uploaded, isset($metadata['parts']) ? \count($metadata['parts']) : $chunksUploaded); | ||
|
|
||
| if ($chunksUploaded === $chunks && $uploaded < $chunks) { | ||
| $deviceForFiles->finalize($path, $chunks, $metadata); | ||
|
|
@@ -526,10 +534,6 @@ public function action( | |
| $metadata | ||
| ); | ||
|
|
||
| if (empty($chunksUploaded)) { | ||
| throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Failed uploading file'); | ||
| } | ||
|
|
||
| $locks($lockKey, 600, fn () => $finalizeUpload($chunksUploaded), timeout: 120.0); | ||
| } catch (LockContention) { | ||
| $response->addHeader('Retry-After', '5'); | ||
|
|
||
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.
Shipwright · CRITICAL
The new guard 'if (empty($chunksUploaded))' is placed before '$chunksUploaded' is assigned in the chunked-upload path.
Impact: The new guard 'if (empty($chunksUploaded))' is placed before '$chunksUploaded' is assigned in the chunked-upload path. In the original code, '$chunksUploaded' was initialized from 'max($uploaded, $chunksUploaded, (int) ($metadata['chunks'] ?? 0))' before any check. The diff removes that initialization and instead checks 'empty($chunksUploaded)' first, so on the first chunk '$chunksUploaded' is still null/0 and the r…
Suggested fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.