Skip to content

Commit c77f07e

Browse files
committed
Preserve context flag when comitting BPlusTree
1 parent a05d0ae commit c77f07e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/realm/array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -556,10 +556,10 @@ class Array : public Node, public ArrayParent {
556556

557557
class TempArray : public Array {
558558
public:
559-
TempArray(size_t sz, Type type = Type::type_HasRefs)
559+
TempArray(size_t sz, Type type = Type::type_HasRefs, bool cf = false)
560560
: Array(Allocator::get_default())
561561
{
562-
create(type, false, sz);
562+
create(type, cf, sz);
563563
}
564564
~TempArray()
565565
{

src/realm/bplustree.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ ref_type BPlusTreeBase::typed_write(ref_type ref, _impl::ArrayWriterBase& out, A
847847
Array node(alloc);
848848
node.init_from_ref(ref);
849849
REALM_ASSERT_DEBUG(node.has_refs());
850-
TempArray written_node(node.size(), NodeHeader::type_InnerBptreeNode);
850+
TempArray written_node(node.size(), NodeHeader::type_InnerBptreeNode, node.get_context_flag());
851851
for (unsigned j = 0; j < node.size(); ++j) {
852852
RefOrTagged rot = node.get_as_ref_or_tagged(j);
853853
if (rot.is_ref() && rot.get_as_ref()) {

0 commit comments

Comments
 (0)