Everett
Loading...
Searching...
No Matches
sort_runtime_context.h
Go to the documentation of this file.
1
12#pragma once
13
21
22namespace everett {
24 std::size_t retained_bytes = std::size_t{8} << 20;
25 std::size_t object_bytes = std::size_t{128} << 10;
26 };
27 // One serialized worker owns this concrete context. Storage handles share
28 // its lifetime when an equivalent mapped publication rebases the core; they
29 // do not add concurrent access or locks. The first output spill may reserve
30 // files while appending a record; subsequent appends reuse that attempt.
31 template <class P, class Selector = registry_selector<typename P::registry_type>, class Ids = random_object_ids,
32 class CatalogOps = sqlite_catalog_ops, class FileOps = posix_object_ops>
33 struct sort_runtime_context : std::enable_shared_from_this<sort_runtime_context<P, Selector, Ids, CatalogOps, FileOps>> {
34 private:
35 // Listed before each writer base, so the writer closes its borrowed Ops
36 // and scratch descriptors before releasing the final context owner.
37 struct context_pin {
38 std::shared_ptr<sort_runtime_context> owner_;
39 explicit context_pin(std::shared_ptr<sort_runtime_context> owner) : owner_(std::move(owner)) {}
40 };
43 auto operator()() { return owner->start_native_stream(); }
44 void poison() noexcept { owner->poison(); }
45 };
46 public:
48 using native_pointer = std::shared_ptr<native_type const>;
50 template <class Compose> struct merge_type : private context_pin,
51 public sort_profile_adaptive_merge<P, native_type, Compose, Selector, FileOps, native_stream_factory> {
53 private:
54 friend struct sort_runtime_context;
55 std::optional<catalog_native_merge> recipe_;
56 merge_type(std::shared_ptr<sort_runtime_context> owner, native_pointer older, native_pointer newer, Compose compose,
57 std::optional<catalog_native_merge> recipe)
58 : context_pin(owner), base_type(native_stream_factory{owner.get()}, owner->budget_, owner->outputs_.object_bytes,
59 std::move(older), std::move(newer), std::move(compose)), recipe_(std::move(recipe)) {}
60 };
61 static std::shared_ptr<sort_runtime_context> open(std::filesystem::path const & root, Ids ids = {},
62 catalog_options options = {}, CatalogOps catalog_ops = {}, FileOps file_ops = {},
63 runtime_output_options outputs = {}, std::string schema = {}) {
64 auto catalog = catalog_type::open(root, options, std::move(catalog_ops));
65 if (catalog.schema_version() != 4) throw std::invalid_argument("streamed runtime requires a named catalog");
66 return std::shared_ptr<sort_runtime_context>(new sort_runtime_context(std::move(catalog), std::move(ids), std::move(file_ops), outputs, std::move(schema)));
67 }
72 bool failed() const noexcept { return failed_ || catalog_.poisoned(); }
73 void poison() noexcept { failed_ = true; }
74 std::uint64_t sealed_outputs() const noexcept { return sealed_outputs_; }
75 std::uint64_t sealed_indexes() const noexcept { return sealed_indexes_; }
76 std::uint64_t reused_outputs() const noexcept { return reused_outputs_; }
77 void check_schema(std::string_view schema) const {
78 if (!schema_.empty() && schema_ != schema) throw std::invalid_argument("runtime merge schema differs from typed snapshot");
79 }
80 std::size_t retained_output_bytes() const noexcept { return budget_.used(); }
81 std::size_t output_limit() const noexcept { return budget_.limit(); }
82 native_pointer empty() const noexcept { return empty_; }
83 object_id const & catalog_identity() const & noexcept { return identity_; }
84 object_id const & catalog_identity() const && = delete;
85 std::filesystem::path const & root() const & noexcept { return catalog_.root(); }
86 std::filesystem::path const & root() const && = delete;
87
88 native_pointer sorted_native(std::span<profile_record const> records) {
90 auto owner = this->shared_from_this();
91 try {
92 // The same encoder retains small output or spills its encoded prefix
93 // once. Finalization checks the complete retained allocation, including
94 // navigation metadata, before acquiring the shared allowance.
97 sort_runtime_detail::write_sorted_native<P, Selector>(writer, records);
98 auto completed = writer.finish();
99 if (auto owned = std::get_if<0>(&completed)) return native_type::from_owned(std::move(*owned));
100 auto receipt = std::get<1>(std::move(completed));
101 catalog_.record_sealed(ids_().hex(), receipt);
102 auto native = native_type::from_sealed(root(), identity_, std::move(receipt));
103 ++sealed_outputs_; return native;
104 } catch (...) { failed_ = true; throw; }
105 }
106 template <class Compose> auto make_merge(native_pointer older, native_pointer newer, Compose compose) {
108 try {
109 auto recipe = merge_recipe<Compose>(older, newer);
110 return std::unique_ptr<merge_type<Compose>>(new merge_type<Compose>(this->shared_from_this(),
111 std::move(older), std::move(newer), std::move(compose), std::move(recipe)));
112 } catch (...) { failed_ = true; throw; }
113 }
114 template <class Compose> native_pointer reuse_merge(native_pointer const & older, native_pointer const & newer) {
116 try {
117 auto recipe = merge_recipe<Compose>(older, newer);
118 if (!recipe) return {}; // No SQL, reservations or forced input sealing.
119 auto receipt = catalog_.acquire_native_merge(ids_().hex(), *recipe, ids_().hex());
120 if (!receipt) return {};
121 auto result = native_type::from_sealed(root(), identity_, std::move(*receipt));
122 ++reused_outputs_; return result;
123 } catch (...) { failed_ = true; throw; }
124 }
125 template <class Merge> native_pointer finish_merge(Merge & merge) {
127 try {
128 if (merge.owner_.get() != this) throw std::invalid_argument("merge belongs to another runtime context");
129 auto completed = merge.finish();
130 if (auto owned = std::get_if<0>(&completed)) return native_type::from_owned(std::move(*owned));
131 auto receipt = std::get<1>(std::move(completed));
132 catalog_.record_sealed(ids_().hex(), receipt);
133 // Only naturally streamed completions install durable hints. Owned
134 // adaptive outputs retain their existing no-I/O path.
135 if (merge.recipe_) catalog_.record_native_merge(ids_().hex(), *merge.recipe_, receipt, ids_().hex());
136 auto native = native_type::from_sealed(root(), identity_, std::move(receipt));
137 ++sealed_outputs_; return native;
138 } catch (...) { failed_ = true; throw; }
139 }
140 template <class Node> struct index_factory {
142 using mapped_type = typename family::storage_type::mapped_pair_type;
144 std::shared_ptr<sort_runtime_context> owner_;
146 typename Node::pair_type main;
147 std::shared_ptr<native_binding<typename mapped_type::native_type> const> native_, secondary_;
148 std::shared_ptr<pair_binding<mapped_type> const> main_;
149 void poison() noexcept { owner_->poison(); }
150 std::unique_ptr<destination_type> operator()() {
151 auto & owner = *owner_; owner.require_active();
152 try {
154 native_ = sealer.ensure_native(native);
155 main_ = main ? sealer.ensure_pair(main) : nullptr;
156 secondary_ = secondary ? sealer.ensure_native(secondary) : nullptr;
157 auto output = owner.ids_(); object_attempt_id attempt(owner.ids_().hex());
158 std::array<catalog_object_reservation, 1> reservation{{{output, file_kind::fractional_index}}};
159 std::array<blob_identity, 1> inputs{main_ ? main_->identity : blob_identity{native_->receipt.object, output}};
160 auto pin = owner.ids_().hex(); auto operation = owner.ids_().hex();
161 owner.catalog_.reserve(operation, attempt, pin, std::span<blob_identity const>(inputs.data(), main_ ? 1 : 0), reservation);
162 cola_file_dependencies dependencies{native_->receipt.object,
163 main_ ? std::optional<blob_identity>(main_->identity) : std::nullopt,
164 secondary_ ? std::optional<object_id>(secondary_->receipt.object) : std::nullopt};
165 return std::make_unique<destination_type>(owner.root(), std::move(output), std::move(attempt),
166 std::move(dependencies), owner.file_ops_, owner.spool_ops_);
167 } catch (...) { owner.failed_ = true; throw; }
168 }
169 };
171 template <class Node> auto make_index(native_pointer native, typename Node::pair_type main, native_pointer secondary) {
173 try {
174 index_factory<Node> factory{this->shared_from_this(), native, secondary, main, {}, {}, {}};
175 return std::make_unique<index_type<Node>>(std::move(factory), budget_, outputs_.object_bytes,
176 std::move(native), std::move(main), std::move(secondary));
177 } catch (...) { failed_ = true; throw; }
178 }
179 template <class Node> typename Node::pair_type finish_index(index_type<Node> & index) {
181 try {
183 using mapped_type = typename family::storage_type::mapped_pair_type;
184 if (index.factory().owner_.get() != this) throw std::invalid_argument("index belongs to another runtime context");
185 auto output = index.finish();
186 if (auto built = std::get_if<std::shared_ptr<typename Node::built_type const>>(&output))
187 return Node::from_built(std::move(*built));
188 auto receipt = std::get<object_seal_receipt>(std::move(output));
189 auto native = index.native_owner(); auto main = index.main_target(); auto secondary = index.secondary_target();
190 // The first spill acknowledged these exact dependencies. The job
191 // retains their authority and mappings along with its source facades.
192 auto const & factory = index.factory();
193 auto const & n = factory.native_; auto const & m = factory.main_; auto const & s = factory.secondary_;
194 blob_identity identity{n->receipt.object, receipt.object};
195 auto mapped_index = catalog_.template seal_pair<mapped_type>(ids_().hex(), identity, receipt);
196 auto mapped = mapped_type::bind(identity, n->mapped, std::move(mapped_index), m ? m->mapped : nullptr,
197 s ? s->mapped : nullptr, s ? std::optional<object_id>(s->receipt.object) : std::nullopt);
198 auto binding = std::make_shared<pair_binding<mapped_type> const>(pair_seal{identity_, identity, std::move(receipt)}, std::move(mapped));
199 auto result = Node::from_sealed_parts(std::move(binding), root(), std::move(native), std::move(main), std::move(secondary));
200 ++sealed_indexes_; return result;
201 } catch (...) { failed_ = true; throw; }
202 }
203 private:
205 Ids ids_;
206 FileOps file_ops_;
213 std::string schema_;
214 bool failed_ = false;
215 sort_runtime_context(catalog_type catalog, Ids ids, FileOps file_ops, runtime_output_options outputs, std::string schema)
216 : catalog_(std::move(catalog)), ids_(std::move(ids)), file_ops_(std::move(file_ops)), outputs_(outputs),
217 budget_(outputs.retained_bytes), identity_(catalog_.identity()), schema_(std::move(schema)) {}
218 template <class Compose> std::optional<catalog_native_merge> merge_recipe(
219 native_pointer const & older, native_pointer const & newer) const {
220 if (!older || !newer) throw std::invalid_argument("null native merge input");
221 // Advisory reuse owns permanent reader pins. A private transaction keeps
222 // its outputs solely under its releasable construction scope instead.
223 if (catalog_.private_construction()) return {};
224 using composer = std::remove_cvref_t<decltype(native_merge_detail::composer(std::declval<Compose &>()))>;
226 // This recognizes known kernels and one registry, not arbitrary allegedly
227 // stateless user code. The persisted domain supplies stable wire identity.
228 if constexpr ((std::is_same_v<composer, replace_native_value> || std::is_same_v<composer, conservative>) &&
229 P::unit == profile_unit::bit &&
230 std::is_same_v<typename P::registry_type, string_registry> &&
231 std::is_same_v<Selector, registry_selector<string_registry>>) {
232 if (schema_.empty()) return {};
233 auto a = older->bindings_.find(identity_, root());
234 if (!a) return {};
235 auto b = newer->bindings_.find(identity_, root());
236 if (!b) return {};
237 return catalog_native_merge{schema_, a->receipt.object, b->receipt.object,
238 std::is_same_v<composer, conservative> ? catalog_native_merge_kind::conservative_tombstones :
240 } else return {};
241 }
242 std::unique_ptr<object_stream<P, FileOps>> start_native_stream() {
244 try {
245 auto output = ids_(); object_attempt_id attempt(ids_().hex());
246 auto owner = ids_().hex(); auto operation = ids_().hex();
247 std::array<catalog_object_reservation, 1> reservation{{{output, file_kind::native_blob}}};
248 // Current roots retain durable inputs. Private outputs may be replayed
249 // from that published frontier if this logical publication fails.
250 catalog_.reserve(operation, attempt, owner, {}, reservation);
251 return std::make_unique<object_stream<P, FileOps>>(root(), std::move(output), std::move(attempt),
253 } catch (...) { failed_ = true; throw; }
254 }
255 void require_active() const { if (failed()) throw std::logic_error("failed sort runtime context"); }
256 };
257
258 template <class P, class Selector = registry_selector<typename P::registry_type>, class Ids = random_object_ids,
259 class CatalogOps = sqlite_catalog_ops, class FileOps = posix_object_ops>
265 template <class Compose> using merge_type = typename context_type::template merge_type<Compose>;
266 sort_file_runtime_storage() = default; // Empty seed snapshots do not start file output.
267 explicit sort_file_runtime_storage(std::shared_ptr<context_type> context) : context_(std::move(context)) {
268 if (!context_) throw std::invalid_argument("null sort runtime context");
269 }
270 static sort_file_runtime_storage open(std::filesystem::path const & root, Ids ids = {},
271 catalog_options options = {}, CatalogOps catalog_ops = {}, FileOps file_ops = {},
272 runtime_output_options outputs = {}) {
273 return sort_file_runtime_storage(context_type::open(root, std::move(ids), options, std::move(catalog_ops), std::move(file_ops), outputs));
274 }
275 static sort_file_runtime_storage open_for_schema(std::filesystem::path const & root, std::string_view schema,
276 catalog_options options = {}) {
277 return sort_file_runtime_storage(context_type::open(root, {}, options, {}, {}, {}, std::string(schema)));
278 }
279 void check_schema(std::string_view schema) const { if (context_) context_->check_schema(schema); }
280 template <class Compose> native_pointer reuse_merge(native_pointer const & older, native_pointer const & newer) {
281 require_context(); return context_->template reuse_merge<Compose>(older, newer);
282 }
283 std::shared_ptr<context_type> context() const noexcept { return context_; }
285 native_pointer sorted_native(std::span<profile_record const> records) {
286 require_context(); return context_->sorted_native(records);
287 }
288 void poison() noexcept { if (context_) context_->poison(); }
289 template <class Compose> auto make_merge(native_pointer older, native_pointer newer, Compose compose) {
290 require_context(); return context_->make_merge(std::move(older), std::move(newer), std::move(compose));
291 }
292 template <class Merge> native_pointer finish_merge(Merge & merge) { require_context(); return context_->finish_merge(merge); }
293 template <class Node> using index_type = typename context_type::template index_type<Node>;
294 template <class Node> auto make_index(native_pointer native, typename Node::pair_type main = {}, native_pointer secondary = {}) {
295 require_context(); return context_->template make_index<Node>(std::move(native), std::move(main), std::move(secondary));
296 }
297 template <class Node> auto finish_index(index_type<Node> & index) { require_context(); return context_->template finish_index<Node>(index); }
298 private:
299 std::shared_ptr<context_type> context_;
300 void require_context() const { if (!context_) throw std::logic_error("streamed output needs an opened storage context"); }
301 };
302
303 template <class P = string_policy, class Selector = registry_selector<typename P::registry_type>, class Ids = random_object_ids,
304 class CatalogOps = sqlite_catalog_ops, class FileOps = posix_object_ops>
306}
Keeps small encoded indexes in memory and spills the same IX03 stream lazily.
constexpr char schema[]
Definition sqlite_catalog.h:282
Definition active_engine.h:18
Shares an allowance for encoded outputs retained in memory.
Seals new runtime owners once and stops at acknowledged shared dependencies.
Seals runtime frontiers and restores named sessions through immutable mappings.
Retains small native merge outputs and spills larger encoded streams once.
Merges sort-owned native records directly into a streamed immutable file.
Runs typed updates through sort-owned native files and the shared redundant scheduler.
Definition sections.h:34
Definition sqlite_catalog.h:50
Definition sqlite_catalog.h:39
Definition cola_adaptive_index.h:149
native_pointer native_owner() const noexcept
Definition cola_adaptive_index.h:165
main_pointer main_target() const noexcept
Definition cola_adaptive_index.h:166
auto finish()
Definition cola_adaptive_index.h:169
Factory const & factory() const noexcept
Definition cola_adaptive_index.h:170
native_pointer secondary_target() const noexcept
Definition cola_adaptive_index.h:167
Definition cola_adaptive_index.h:20
Definition cola_file_index.h:33
Definition sections.h:486
Definition object_writer.h:39
Definition object_path.h:38
Definition output_budget.h:26
std::size_t limit() const noexcept
Definition output_budget.h:69
std::size_t used() const noexcept
Definition output_budget.h:70
Definition runtime_seal.h:24
Definition cola_file_index.h:20
Definition profile.h:294
Definition sort_profile.h:20
Definition sort_runtime_context.h:23
std::size_t object_bytes
Definition sort_runtime_context.h:25
std::size_t retained_bytes
Definition sort_runtime_context.h:24
Definition runtime_graph_sealer.h:22
std::shared_ptr< pair_binding_type const > ensure_pair(pair_type const &pair)
Definition runtime_graph_sealer.h:147
std::shared_ptr< native_binding_type const > ensure_native(native_pointer const &native)
Definition runtime_graph_sealer.h:136
Definition sort_runtime_context.h:260
sort_file_runtime_storage(std::shared_ptr< context_type > context)
Definition sort_runtime_context.h:267
auto make_merge(native_pointer older, native_pointer newer, Compose compose)
Definition sort_runtime_context.h:289
typename context_type::template index_type< Node > index_type
Definition sort_runtime_context.h:293
std::shared_ptr< context_type > context_
Definition sort_runtime_context.h:299
void require_context() const
Definition sort_runtime_context.h:300
void check_schema(std::string_view schema) const
Definition sort_runtime_context.h:279
static sort_file_runtime_storage open(std::filesystem::path const &root, Ids ids={}, catalog_options options={}, CatalogOps catalog_ops={}, FileOps file_ops={}, runtime_output_options outputs={})
Definition sort_runtime_context.h:270
typename context_type::native_type native_type
Definition sort_runtime_context.h:263
native_pointer finish_merge(Merge &merge)
Definition sort_runtime_context.h:292
typename context_type::native_pointer native_pointer
Definition sort_runtime_context.h:264
std::shared_ptr< context_type > context() const noexcept
Definition sort_runtime_context.h:283
static sort_file_runtime_storage open_for_schema(std::filesystem::path const &root, std::string_view schema, catalog_options options={})
Definition sort_runtime_context.h:275
auto make_index(native_pointer native, typename Node::pair_type main={}, native_pointer secondary={})
Definition sort_runtime_context.h:294
native_pointer sorted_native(std::span< profile_record const > records)
Definition sort_runtime_context.h:285
typename context_type::template merge_type< Compose > merge_type
Definition sort_runtime_context.h:265
auto finish_index(index_type< Node > &index)
Definition sort_runtime_context.h:297
void poison() noexcept
Definition sort_runtime_context.h:288
native_pointer reuse_merge(native_pointer const &older, native_pointer const &newer)
Definition sort_runtime_context.h:280
native_pointer empty() const
Definition sort_runtime_context.h:284
Definition sort_profile_adaptive.h:137
Definition sort_profile_adaptive.h:83
Definition sort_runtime_context.h:37
context_pin(std::shared_ptr< sort_runtime_context > owner)
Definition sort_runtime_context.h:39
std::shared_ptr< sort_runtime_context > owner_
Definition sort_runtime_context.h:38
Definition sort_runtime_context.h:140
native_pointer native
Definition sort_runtime_context.h:145
std::shared_ptr< native_binding< typename mapped_type::native_type > const > native_
Definition sort_runtime_context.h:147
native_pointer secondary
Definition sort_runtime_context.h:145
std::shared_ptr< sort_runtime_context > owner_
Definition sort_runtime_context.h:144
std::shared_ptr< pair_binding< mapped_type > const > main_
Definition sort_runtime_context.h:148
std::unique_ptr< destination_type > operator()()
Definition sort_runtime_context.h:150
typename family::storage_type::mapped_pair_type mapped_type
Definition sort_runtime_context.h:142
Node::pair_type main
Definition sort_runtime_context.h:146
std::shared_ptr< native_binding< typename mapped_type::native_type > const > secondary_
Definition sort_runtime_context.h:147
void poison() noexcept
Definition sort_runtime_context.h:149
Definition sort_runtime_context.h:51
merge_type(std::shared_ptr< sort_runtime_context > owner, native_pointer older, native_pointer newer, Compose compose, std::optional< catalog_native_merge > recipe)
Definition sort_runtime_context.h:56
std::optional< catalog_native_merge > recipe_
Definition sort_runtime_context.h:55
Definition sort_runtime_context.h:41
auto operator()()
Definition sort_runtime_context.h:43
sort_runtime_context * owner
Definition sort_runtime_context.h:42
void poison() noexcept
Definition sort_runtime_context.h:44
Definition sort_runtime_context.h:33
native_pointer finish_merge(Merge &merge)
Definition sort_runtime_context.h:125
object_id identity_
Definition sort_runtime_context.h:211
bool failed_
Definition sort_runtime_context.h:214
static std::shared_ptr< sort_runtime_context > open(std::filesystem::path const &root, Ids ids={}, catalog_options options={}, CatalogOps catalog_ops={}, FileOps file_ops={}, runtime_output_options outputs={}, std::string schema={})
Definition sort_runtime_context.h:61
catalog_type catalog_
Definition sort_runtime_context.h:204
auto make_index(native_pointer native, typename Node::pair_type main, native_pointer secondary)
Definition sort_runtime_context.h:171
std::filesystem::path const & root() const &noexcept
Definition sort_runtime_context.h:85
sort_runtime_context & operator=(sort_runtime_context const &)=delete
std::size_t output_limit() const noexcept
Definition sort_runtime_context.h:81
Ids ids_
Definition sort_runtime_context.h:205
native_pointer sorted_native(std::span< profile_record const > records)
Definition sort_runtime_context.h:88
void check_schema(std::string_view schema) const
Definition sort_runtime_context.h:77
std::uint64_t reused_outputs_
Definition sort_runtime_context.h:212
object_id const & catalog_identity() const &noexcept
Definition sort_runtime_context.h:83
std::uint64_t reused_outputs() const noexcept
Definition sort_runtime_context.h:76
std::uint64_t sealed_indexes_
Definition sort_runtime_context.h:212
std::optional< catalog_native_merge > merge_recipe(native_pointer const &older, native_pointer const &newer) const
Definition sort_runtime_context.h:218
output_budget budget_
Definition sort_runtime_context.h:209
sort_runtime_context(catalog_type catalog, Ids ids, FileOps file_ops, runtime_output_options outputs, std::string schema)
Definition sort_runtime_context.h:215
auto make_merge(native_pointer older, native_pointer newer, Compose compose)
Definition sort_runtime_context.h:106
sort_runtime_context(sort_runtime_context &&)=delete
posix_index_spool_ops spool_ops_
Definition sort_runtime_context.h:207
std::uint64_t sealed_indexes() const noexcept
Definition sort_runtime_context.h:75
std::filesystem::path const & root() const &&=delete
void poison() noexcept
Definition sort_runtime_context.h:73
sort_runtime_native< P, Selector > native_type
Definition sort_runtime_context.h:47
std::unique_ptr< object_stream< P, FileOps > > start_native_stream()
Definition sort_runtime_context.h:242
runtime_output_options outputs_
Definition sort_runtime_context.h:208
native_pointer empty() const noexcept
Definition sort_runtime_context.h:82
native_pointer empty_
Definition sort_runtime_context.h:210
FileOps file_ops_
Definition sort_runtime_context.h:206
Node::pair_type finish_index(index_type< Node > &index)
Definition sort_runtime_context.h:179
bool failed() const noexcept
Definition sort_runtime_context.h:72
native_pointer reuse_merge(native_pointer const &older, native_pointer const &newer)
Definition sort_runtime_context.h:114
sort_runtime_context & operator=(sort_runtime_context &&)=delete
std::shared_ptr< native_type const > native_pointer
Definition sort_runtime_context.h:48
object_id const & catalog_identity() const &&=delete
sort_runtime_context(sort_runtime_context const &)=delete
std::string schema_
Definition sort_runtime_context.h:213
std::size_t retained_output_bytes() const noexcept
Definition sort_runtime_context.h:80
void require_active() const
Definition sort_runtime_context.h:255
std::uint64_t sealed_outputs() const noexcept
Definition sort_runtime_context.h:74
std::uint64_t sealed_outputs_
Definition sort_runtime_context.h:212
Definition sort_runtime.h:152
Definition sort_runtime.h:42
static pointer from_sealed(std::filesystem::path const &root, object_id catalog, object_seal_receipt receipt)
Definition sort_runtime.h:70
static pointer from_owned(array_type value)
Definition sort_runtime.h:48
Definition sort_runtime.h:121
static auto empty()
Definition sort_runtime.h:139
Definition sqlite_catalog.h:351
void record_native_merge(std::string_view op, catalog_native_merge const &key, object_seal_receipt const &receipt, std::string_view owner)
Definition sqlite_catalog.h:568
bool private_construction() const noexcept
Definition sqlite_catalog.h:392
static sqlite_catalog open(std::filesystem::path const &root, catalog_options options={}, Ops ops={})
Definition sqlite_catalog.h:379
std::filesystem::path const & root() const &noexcept
Definition sqlite_catalog.h:396
std::optional< object_seal_receipt > acquire_native_merge(std::string_view op, catalog_native_merge const &key, std::string_view owner)
Definition sqlite_catalog.h:603
void record_sealed(std::string_view op, object_seal_receipt const &receipt)
Definition sqlite_catalog.h:552
bool poisoned() const noexcept
Definition sqlite_catalog.h:391
void reserve(std::string_view op, object_attempt_id const &attempt, std::string_view owner, std::span< blob_identity const > inputs, std::span< catalog_object_reservation const > outputs)
Definition sqlite_catalog.h:518
Definition typed_world.h:171