[ 
https://issues.apache.org/jira/browse/IGNITE-15755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladislav Pyatkov updated IGNITE-15755:
---------------------------------------
    Description: 
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.

  was:
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}


> 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.



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

Reply via email to