|
@@ -243,10 +243,15 @@ void WebServerService::ensureExecutionsSummaryView() {
|
|
|
// view created by this client is also queryable by it. Earlier versions
|
|
// view created by this client is also queryable by it. Earlier versions
|
|
|
// registered the name unqualified while queries were project-prefixed, which
|
|
// registered the name unqualified while queries were project-prefixed, which
|
|
|
// made the view unreachable.
|
|
// made the view unreachable.
|
|
|
|
|
+ // Recreate rather than reuse. A view is metadata over a collection, so
|
|
|
|
|
+ // rebuilding it costs nothing, and keeping an existing one means the view
|
|
|
|
|
+ // silently outlives the field list below: after a database recovery the old
|
|
|
|
|
+ // view served documents that were no longer in the collection at all.
|
|
|
for (const auto& view : storage_->listViews()) {
|
|
for (const auto& view : storage_->listViews()) {
|
|
|
if (view.name == kExecutionsSummaryView) {
|
|
if (view.name == kExecutionsSummaryView) {
|
|
|
- LOG_DEBUG("Executions summary view already present");
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ LOG_INFO("Rebuilding the executions summary view");
|
|
|
|
|
+ storage_->dropView(kExecutionsSummaryView);
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|