簡體   English   中英

在Orientdb中以分布式模式創建數據庫

[英]Creating a database in Orientdb in distributed mode

我們的系統以編程方式創建OrientDB數據庫,並為每個客戶使用一個數據庫(在有人拒絕使用該設計之前,原因是安全性,在數據中心/區域之間移動某些客戶/數據的可能性以及將其遷移到內部部署的可能性)。

在OrientDB中以單模式運行時效果很好。 但是,當數據庫以分布式模式設置時(亞馬遜上有3台服務器)。 溫和地說,這種行為很奇怪。 我知道文檔沒有對此表示任何支持,但我找不到任何說明也沒有支持的支持。

有時可以很好地創建數據庫,但是客戶端可以無限期地鎖定(在OAdaptiveLock.lock() )。 有時需要重新啟動整個集群才能使用數據庫,有時,就在撰寫本文時,一個OrientDB節點似乎在與其他節點同步后自行關閉( Address[1.2.3.4]:2434 is SHUTTING_DOWN [LifecycleService] -> Terminating forcefully... [Node] )。 錯誤消息由stacktrace處理(請參見下文)。

所以,對我的問題:

  1. OrientDB是否支持以分布式方式在線創建數據庫?
  2. 如果是這樣,我該怎么辦?
  3. 如果沒有,將來是否有計划支持此計划?

提前致謝!

./Anders

堆棧跟蹤:

2016-01-28 14:00:01:395 SEVER [infogile02] error on creating cluster 'superclassesedge_infogile02' in class 'superClassesEdge':  [OHazelcastPlugin][infogile02] Error on starting distributed plugin
com.orientechnologies.orient.server.distributed.ODistributedException: com.orientechnologies.orient.server.distributed.ODistributedException: Error on creating cluster 'superclassesedge_infogile02' in class 'superClassesEdge'
    at com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.configureDatabase(OHazelcastDistributedDatabase.java:241)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installDatabaseFromNetwork(OHazelcastPlugin.java:1131)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.requestDatabase(OHazelcastPlugin.java:971)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installDatabase(OHazelcastPlugin.java:908)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installNewDatabases(OHazelcastPlugin.java:1468)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.startup(OHazelcastPlugin.java:185)
    at com.orientechnologies.orient.server.OServer.registerPlugins(OServer.java:979)
    at com.orientechnologies.orient.server.OServer.activate(OServer.java:346)
    at com.orientechnologies.orient.server.OServerMain.main(OServerMain.java:41)
Caused by: com.orientechnologies.orient.server.distributed.ODistributedException: Error on creating cluster 'superclassesedge_infogile02' in class 'superClassesEdge'
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installLocalClusterPerClass(OHazelcastPlugin.java:1631)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installDbClustersForLocalNode(OHazelcastPlugin.java:1300)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$2.call(OHazelcastPlugin.java:1134)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin$2.call(OHazelcastPlugin.java:1131)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastDistributedDatabase.configureDatabase(OHazelcastDistributedDatabase.java:239)
    ... 8 more
Caused by: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record #0:1
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:2044)
    at com.orientechnologies.orient.core.tx.OTransactionNoTx.saveRecord(OTransactionNoTx.java:159)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:2568)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.save(ODatabaseDocumentTx.java:121)
    at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1768)
    at com.orientechnologies.orient.core.record.impl.ODocument.save(ODocument.java:1764)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared$1.call(OSchemaShared.java:1213)
    at com.orientechnologies.orient.core.db.OScenarioThreadLocal.executeAsDistributed(OScenarioThreadLocal.java:71)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.saveInternal(OSchemaShared.java:1208)
    at com.orientechnologies.orient.core.metadata.schema.OSchemaShared.releaseSchemaWriteLock(OSchemaShared.java:642)
    at com.orientechnologies.orient.core.metadata.schema.OClassImpl.releaseSchemaWriteLock(OClassImpl.java:1824)
    at com.orientechnologies.orient.core.metadata.schema.OClassImpl.releaseSchemaWriteLock(OClassImpl.java:1819)
    at com.orientechnologies.orient.core.metadata.schema.OClassImpl.addCluster(OClassImpl.java:1088)
    at com.orientechnologies.orient.server.hazelcast.OHazelcastPlugin.installLocalClusterPerClass(OHazelcastPlugin.java:1624)
    ... 12 more
Caused by: java.lang.NullPointerException
    at com.orientechnologies.orient.core.storage.impl.local.paginated.atomicoperations.OAtomicOperationsManager.endAtomicOperation(OAtomicOperationsManager.java:148)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.doUpdateRecord(OAbstractPaginatedStorage.java:2046)
    at com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.updateRecord(OAbstractPaginatedStorage.java:971)
    at com.orientechnologies.orient.server.distributed.ODistributedStorage.updateRecord(ODistributedStorage.java:708)
    at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.executeSaveRecord(ODatabaseDocumentTx.java:2005)
    ... 25 more

2016-01-28 14:00:01:398 INFO  [10.0.9.105]:2434 [orientdb] [3.5.3] Address[10.0.9.105]:2434 is SHUTTING_DOWN [LifecycleService]
2016-01-28 14:00:01:398 WARNI [10.0.9.105]:2434 [orientdb] [3.5.3] Terminating forcefully... [Node]
2016-01-28 14:00:01:399 INFO  [10.0.9.105]:2434 [orientdb] [3.5.3] Shutting down connection manager... [Node]

代表tl; dr的嚴重情況。 Orientdb中有關分布式體系結構的文檔清楚地指出:“在自動創建集群時,在多個節點上創建數據庫可能會導致同步問題。請先創建數據庫,然后才能在分布式模式下運行”。

根據文檔,建議的解決方案似乎是“分區圖”(此處描述為http://orientdb.com/docs/2.0/orientdb.wiki/Partitioned-Graphs.html )。 該解決方案並不能真正解決我們的所有問題,但從理論上講已經足夠了。

但是,實際上這是行不通的,因為需要對事務進行不同的管理,因此需要大量重寫。 另一個主題中的更多內容。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM