aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2024-12-18 10:33:07 +0100
committerGitHub Enterprise <[email protected]>2024-12-18 10:33:07 +0100
commit449e304c39f15bae863329c1c45df8d7fccb6bce (patch)
treeb610fd523923ff7b52d8be7a2e6f391b4683f563 /src
parentMiscellaneous minor LLM fixes (#268) (diff)
downloadzen-449e304c39f15bae863329c1c45df8d7fccb6bce.tar.xz
zen-449e304c39f15bae863329c1c45df8d7fccb6bce.zip
don't add overhead of verifying oplog presence on disk for "getchunks" rpc call (#269)
Diffstat (limited to 'src')
-rw-r--r--src/zenserver/projectstore/projectstore.cpp8
1 files changed, 5 insertions, 3 deletions
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())