aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/include
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-08-11 13:55:19 +0200
committerGitHub <[email protected]>2023-08-11 13:55:19 +0200
commit26717f50c658ea2cf745a4e0042735d3fa21f214 (patch)
tree26ea44cc893e6a4a2b041c8ca55fc7aae47d1076 /src/zencore/include
parentAdd `response.text` to output in log when jupiter request fails (#354) (diff)
downloadzen-26717f50c658ea2cf745a4e0042735d3fa21f214.tar.xz
zen-26717f50c658ea2cf745a4e0042735d3fa21f214.zip
Make sure we always write "data" attachment hash for snapshotted oplog entries (#355)
* Make sure we always write "data" attachment hash for snapshotted oplog entries * Make sure to add chunk mappings for files moved to attatchment in snapshot operation * fix inverted timoute for expiration (we don't want time expiry in these cases) * increase timeout for jupiter oplog in project to 3 min * changelog
Diffstat (limited to 'src/zencore/include')
-rw-r--r--src/zencore/include/zencore/compactbinaryutil.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/zencore/include/zencore/compactbinaryutil.h b/src/zencore/include/zencore/compactbinaryutil.h
index 9d69266bf..9524d1fc4 100644
--- a/src/zencore/include/zencore/compactbinaryutil.h
+++ b/src/zencore/include/zencore/compactbinaryutil.h
@@ -23,11 +23,9 @@ namespace zen {
return `false` to have RewriteCbObject copy the field into the new object.
*/
-CbObject
-RewriteCbObject(CbObjectView InObj, Invocable<CbObjectWriter&, CbFieldView&> auto Rewriter)
+void
+RewriteCbObject(CbObjectWriter& CboWriter, CbObjectView InObj, Invocable<CbObjectWriter&, CbFieldView&> auto Rewriter)
{
- CbObjectWriter CboWriter;
-
for (CbFieldView InnerField : InObj)
{
if (!Rewriter(CboWriter, InnerField))
@@ -35,8 +33,14 @@ RewriteCbObject(CbObjectView InObj, Invocable<CbObjectWriter&, CbFieldView&> aut
CboWriter.AddField(InnerField.GetName(), InnerField);
}
}
+}
- return CboWriter.Save();
+CbObject
+RewriteCbObject(CbObjectView InObj, Invocable<CbObjectWriter&, CbFieldView&> auto Rewriter)
+{
+ CbObjectWriter Writer;
+ RewriteCbObject(Writer, InObj, Rewriter);
+ return Writer.Save();
}
} // namespace zen