Skip to content

Commit

Permalink
fix: corrections on distributed configuration after core refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
tglman committed Jan 24, 2024
1 parent 6d32583 commit 35396c1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.orientechnologies.orient.core.metadata.schema.OType;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.executor.OResult;
import com.orientechnologies.orient.distributed.db.OrientDBDistributed;
import com.orientechnologies.orient.server.OServer;
import com.orientechnologies.orient.server.distributed.ODistributedConfiguration;
import com.orientechnologies.orient.server.distributed.ODistributedRequest;
Expand Down Expand Up @@ -321,7 +322,9 @@ private ODocument calculateDBStatus(

private ODocument singleDBStatus(ODistributedServerManager manager, String database) {
final ODocument entries = new ODocument();
final ODistributedConfiguration dbCfg = manager.getDatabaseConfiguration(database, false);
final ODistributedConfiguration dbCfg =
((OrientDBDistributed) manager.getServerInstance().getDatabases())
.getExistingDistributedConfiguration(database);
final Set<String> servers = dbCfg.getAllConfiguredServers();
for (String serverName : servers) {
final ODistributedServerManager.DB_STATUS databaseStatus =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.orientechnologies.common.log.OLogManager;
import com.orientechnologies.enterprise.server.OEnterpriseServer;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.distributed.db.OrientDBDistributed;
import com.orientechnologies.orient.server.distributed.ODistributedConfiguration;
import com.orientechnologies.orient.server.distributed.ODistributedServerManager;
import com.orientechnologies.orient.server.network.protocol.http.OHttpRequest;
Expand Down Expand Up @@ -89,7 +90,9 @@ private ODocument calculateDBStatus(

private ODocument singleDBStatus(ODistributedServerManager manager, String database) {
final ODocument entries = new ODocument();
final ODistributedConfiguration dbCfg = manager.getDatabaseConfiguration(database, false);
final ODistributedConfiguration dbCfg =
((OrientDBDistributed) manager.getServerInstance().getDatabases())
.getExistingDistributedConfiguration(database);
final Set<String> servers = dbCfg.getAllConfiguredServers();
for (String serverName : servers) {
final ODistributedServerManager.DB_STATUS databaseStatus =
Expand Down

0 comments on commit 35396c1

Please sign in to comment.