diff options
| author | Dan Engelbrecht <[email protected]> | 2024-12-18 10:33:07 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2024-12-18 10:33:07 +0100 |
| commit | 449e304c39f15bae863329c1c45df8d7fccb6bce (patch) | |
| tree | b610fd523923ff7b52d8be7a2e6f391b4683f563 | |
| parent | Miscellaneous minor LLM fixes (#268) (diff) | |
| download | zen-449e304c39f15bae863329c1c45df8d7fccb6bce.tar.xz zen-449e304c39f15bae863329c1c45df8d7fccb6bce.zip | |
don't add overhead of verifying oplog presence on disk for "getchunks" rpc call (#269)
| -rw-r--r-- | CHANGELOG.md | 1 | ||||
| -rw-r--r-- | src/zenserver/projectstore/projectstore.cpp | 8 |
2 files changed, 6 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cfb0cfe88..490a3e3c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Improvement: Batch fetch record attachments when appropriate - Improvement: Reduce memory buffer allocation in BlockStore::IterateBlock - Improvement: Tweaked BlockStore::IterateBlock logic when to use threaded work (at least 4 chunks requested) +- Improvement: Remove overhead of verifying oplog presence on disk for "getchunks" rpc call in project store - Bugfix: CasContainerStrategy::IterateChunks could give wrong payload/index when requesting 1 or 2 chunks ## 5.5.16 diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index d39d78cb9..ff387b448 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -5433,7 +5433,11 @@ ProjectStore::Rpc(HttpServerRequest& HttpReq, } Project->TouchProject(); - ProjectStore::Oplog* Oplog = Project->OpenOplog(OplogId, /*AllowCompact*/ false, /*VerifyPathOnDisk*/ true); + std::string_view Method = Cb["method"sv].AsString(); + + bool VerifyPathOnDisk = Method != "getchunks"sv; + + ProjectStore::Oplog* Oplog = Project->OpenOplog(OplogId, /*AllowCompact*/ false, VerifyPathOnDisk); if (!Oplog) { HttpReq.WriteResponse(HttpResponseCode::NotFound, @@ -5443,8 +5447,6 @@ ProjectStore::Rpc(HttpServerRequest& HttpReq, } Project->TouchOplog(OplogId); - std::string_view Method = Cb["method"sv].AsString(); - if (Method == "import"sv) { if (!AreDiskWritesAllowed()) |