Skip to content

Commit

Permalink
fix: make sure to set the database online only when present and activ…
Browse files Browse the repository at this point in the history
…e, issue #10386
  • Loading branch information
tglman committed Feb 6, 2025
1 parent 20ae7eb commit ffd65f0
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,19 @@ public void removeProfilerHook() {
public void initFirstOpen(ODatabaseDocumentInternal session) {
ODistributedConfiguration cfg = this.context.getOrInitDistributedConfiguration(session);
manager.checkNodeInConfiguration(databaseName, cfg);
setOnline();
fillStatus();

// SET THE NODE.DB AS ONLINE
OStorage storage = context.getStorage(databaseName);
if (storage != null && !manager.isSyncronizing(databaseName)) {
logger.infoNode(
localNodeName,
"Publishing ONLINE status for database %s.%s...",
localNodeName,
databaseName);
manager.setDatabaseStatus(localNodeName, databaseName, DB_STATUS.ONLINE);
}
resume();
}

protected String getLocalNodeName() {
Expand Down

0 comments on commit ffd65f0

Please sign in to comment.