Просмотр исходного кода

Count nodes in build data readiness so a warm start still has them

The nodes domain is never written to the cache, so on any launch after the
first the node table was empty, nothing was counted, and no progress bar could
move regardless of what had been claimed.

Counting nodes in the readiness gate makes a warm start extract again rather
than serve build data that is missing a domain. Slower than a cache hit and
correct; persisting the domain would buy the speed back.
Millie 2 недель назад
Родитель
Сommit
19ad8bbbb8

+ 9 - 1
Sunrise/src/state/build_data/runtime/persistence/build_data_persistence.cpp

@@ -104,7 +104,14 @@ Context& context() noexcept {
     return g_context;
 }
 
-/** @return True when every extracted domain is complete in State. */
+/**
+ * @return True when every extracted domain is complete in State.
+ *
+ * The nodes domain is not written to the cache, so counting it here means a warm start finds the
+ * build data incomplete and extracts again. That is slower than a cache hit and it is correct:
+ * without it the node table is empty on every launch but the first, no presentation node is counted,
+ * and no progress bar can move whatever the claims say. Persisting nodes would buy the speed back.
+ */
 bool all_domains_ready() noexcept {
     constants::InvestmentConstants published{};
     return runtime::named::ready() && item_definitions_ready() && configured_item_details_ready()
@@ -112,6 +119,7 @@ bool all_domains_ready() noexcept {
            && material_requirement_sets_ready() && inventory_bucket_descriptors_ready()
            && socket_entry_lists_ready() && ability_buckets_ready()
            && progression_definitions_ready() && record_definitions_ready()
+           && node_definitions_ready()
            && scenario_layouts_ready() && spawn_sets_ready()
            && hash_names_ready() && constants::find(published);
 }