You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladislav Pyatkov (Jira)" <ji...@apache.org> on 2021/10/20 20:47:00 UTC

[jira] [Commented] (IGNITE-15755) Unable to clear raft log on raft node stop in jraft

    [ https://issues.apache.org/jira/browse/IGNITE-15755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17432092#comment-17432092 ] 

Vladislav Pyatkov commented on IGNITE-15755:
--------------------------------------------

In additional, I want that the all paths where the RAFT log stored should be suitable for Windows.
At the moment, I am getting an exception when start any test from ITDynamicTableCreationTest.
{noformat}
2021-10-20 23:42:49:156 +0300 [ERROR][Thread-71][RocksDBLogStorage] Fail to init RocksDBLogStorage, path=target\work\ITDynamicTableCreationTest\testDynamicSimpleTableCreation_1634762560693\ITDynamicTableCreationTest_testDynamicSimpleTableCreation_3344\1-87fae24b-8883-4010-84dc-5afe1b0eba89_part_7_192.168.88.177_3344\logs.org.rocksdb.RocksDBException: Failed to create a directory: target\work\ITDynamicTableCreationTest\testDynamicSimpleTableCreation_1634762560693\ITDynamicTableCreationTest_testDynamicSimpleTableCreation_3344\1-87fae24b-8883-4010-84dc-5afe1b0eba89_part_7_192.168.88.177_3344\logs: Èìÿ ôàéëà èëè åãî ðàñøèðåíèå èìååò ñëèøêîì áîëüøóþ äëèíó.
at org.rocksdb.RocksDB.open(Native Method)
at org.rocksdb.RocksDB.open(RocksDB.java:306)
at org.apache.ignite.raft.jraft.storage.impl.RocksDBLogStorage.openDB(RocksDBLogStorage.java:306)
at org.apache.ignite.raft.jraft.storage.impl.RocksDBLogStorage.initAndLoad(RocksDBLogStorage.java:219)
at org.apache.ignite.raft.jraft.storage.impl.RocksDBLogStorage.init(RocksDBLogStorage.java:196)
at org.apache.ignite.raft.jraft.storage.impl.RocksDBLogStorage.init(RocksDBLogStorage.java:66)
at org.apache.ignite.raft.jraft.storage.impl.LogManagerImpl.init(LogManagerImpl.java:183)
at org.apache.ignite.raft.jraft.storage.impl.LogManagerImpl.init(LogManagerImpl.java:65)
at org.apache.ignite.raft.jraft.core.NodeImpl.initLogStorage(NodeImpl.java:560)
at org.apache.ignite.raft.jraft.core.NodeImpl.init(NodeImpl.java:969)
at org.apache.ignite.raft.jraft.core.NodeImpl.init(NodeImpl.java:122)
at org.apache.ignite.raft.jraft.RaftGroupService.start(RaftGroupService.java:108)
at org.apache.ignite.internal.raft.server.impl.JRaftServerImpl.startRaftGroup(JRaftServerImpl.java:268)
at org.apache.ignite.internal.raft.Loza.prepareRaftGroup(Loza.java:146)
at org.apache.ignite.internal.table.distributed.TableManager.createTableLocally(TableManager.java:447)
at org.apache.ignite.internal.table.distributed.TableManager$1.onTableCreateInternal(TableManager.java:319)
at org.apache.ignite.internal.table.distributed.TableManager$1.onCreate(TableManager.java:207)
at org.apache.ignite.internal.configuration.util.ConfigurationNotificationsUtil.notifyPublicListeners(ConfigurationNotificationsUtil.java:475)
at org.apache.ignite.internal.configuration.util.ConfigurationNotificationsUtil$1.visitNamedListNode(ConfigurationNotificationsUtil.java:255)
at org.apache.ignite.internal.configuration.util.ConfigurationNotificationsUtil$1.visitNamedListNode(ConfigurationNotificationsUtil.java:118)
at org.apache.ignite.configuration.schemas.table.TablesNode.traverseChildren(Unknown Source)
at org.apache.ignite.internal.configuration.util.ConfigurationNotificationsUtil.notifyListeners(ConfigurationNotificationsUtil.java:118)
at org.apache.ignite.internal.configuration.util.ConfigurationNotificationsUtil.notifyListeners(ConfigurationNotificationsUtil.java:66)
at org.apache.ignite.internal.configuration.ConfigurationRegistry$2.visitInnerNode(ConfigurationRegistry.java:235)
at org.apache.ignite.internal.configuration.ConfigurationRegistry$2.visitInnerNode(ConfigurationRegistry.java:225)
at org.apache.ignite.internal.configuration.SuperRoot.traverseChildren(SuperRoot.java:100)
at org.apache.ignite.internal.configuration.ConfigurationRegistry.notificator(ConfigurationRegistry.java:225)
at org.apache.ignite.internal.configuration.ConfigurationChanger.updateFromListener(ConfigurationChanger.java:444)
at org.apache.ignite.internal.configuration.storage.DistributedConfigurationStorage$1.onUpdate(DistributedConfigurationStorage.java:273)
at org.apache.ignite.internal.metastorage.watch.WatchAggregator$1.onUpdate(WatchAggregator.java:186)
at org.apache.ignite.internal.metastorage.client.MetaStorageServiceImpl$WatchProcessor$Watcher.run(MetaStorageServiceImpl.java:473)
{noformat}

> Unable to clear raft log on raft node stop in jraft
> ---------------------------------------------------
>
>                 Key: IGNITE-15755
>                 URL: https://issues.apache.org/jira/browse/IGNITE-15755
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Alexander Lapin
>            Priority: Major
>              Labels: ignite-3
>
> h3. Problem
> In case of partition reassignment, meta storage reconfiguration or table drop it's required not only to cleanup data storage but also clear stable raft log. Currently there's no such method in api.
> h3. Possible Solution
> [~ascherbakov] suggested updating
> {code:java}
> org.apache.ignite.raft.jraft.RaftGroupService#shutdown{code}
> with {color:#1d1c1d}boolean cleanupState{color} flag
> {code:java}
> org.apache.ignite.raft.jraft.RaftGroupService#shutdown(boolean cleanupState){code}
> RAFT initializes three different storage for a group:
> {code:java}
> nodeOptions.setLogUri(serverDataPath.resolve("logs").toString());
> nodeOptions.setRaftMetaUri(serverDataPath.resolve("meta").toString());
> nodeOptions.setSnapshotUri(serverDataPath.resolve("snapshot").toString())
> {code}
> when the RAFT group is dropping from node (assignment changed or table is dropped) all those directories have to remove from disk.
> Implementation requited:
> # Implement a method _LogStorage#destroy_, the method will clear storage folder.
> # Add an invocation of this method to API. It might add a _destroy_ flag to method RaftServer#stopRaftGroup or add another one method.
> # Write a test which demonstrate that folders don't exist after group destroyed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)