Vladimir Steshin created IGNITE-29126:
-----------------------------------------

             Summary: Bind snapshot relative path to the default snapshot 
directory
                 Key: IGNITE-29126
                 URL: https://issues.apache.org/jira/browse/IGNITE-29126
             Project: Ignite
          Issue Type: Improvement
            Reporter: Vladimir Steshin


When creating, checking, or restoring snapshots, the user can pass a snapshot 
path as an optional operation parameter. Examples:
{code:java}
AbstractSnapshotOperationRequest#snpPath
SnapshotCreateCommandArg#dest
control.sh --snapshot create snapshot_1 --dest /tmp/ignite/snapshots {code}
Currently, the snapshot operations bind the relative snapshot path to the 
process working directory. Neither to the node's working directory 
(`{_}IgniteConfiguration#igniteWorkDir{_}`) not to the default snapshot 
directory (`{_}IgniteConfiguration#snapshotPath{_}`). `{_}SnapshotFileTree{_}` 
uses the passed path simply as `{_}new File(path, name){_}`:
{code:java}
public static File root(SharedFileTree ft, String name, @Nullable String path) {

   return path == null ? ... : new File(path, name);
} {code}
 As a result, invoking something like
{code:java}
ignite.createSnapshot("testSnapshot", path, false, false) {code}
creates a snapshot, for example, in Ignite's source folder, e.g. 
`{_}~/src/ignite/modules/core/ex_snapshots/testSnapshot{_}`.

 

We should use the default snapshot directory for all snapshot operations when 
the user passes a relative snapshot path.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to