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

Aleksey Plekhanov resolved IGNITE-16872.
----------------------------------------
    Fix Version/s: 2.14
     Release Note: Fixed 'Invalid cross-device link error' when extending WAL 
segments size
       Resolution: Fixed

[~NSAmelchev] thanks for the review! Merged to master.

> 'Invalid cross-device link error' exception when extending WAL segments size
> ----------------------------------------------------------------------------
>
>                 Key: IGNITE-16872
>                 URL: https://issues.apache.org/jira/browse/IGNITE-16872
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Major
>              Labels: ise
>             Fix For: 2.14
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> If required WAL segments size is more than current WAL segments size 
> (configuration changes) Ignite extend this size on startup (see 
> {{{}FileWriteAheadLogManager#formatWorkSegments{}}}). To do this each segment 
> copied to the new temp file, temp file is extended and temp file is moved to 
> the original segment file (using {{ATOMIC_MOVE}} option). But temp files are 
> created in the current work dir ({{{}file().getName(){}}} used instead of 
> {{{}file().getAbsolutePath(){}}}:
> {code:java}
> File tmpDst = new File(fd.file().getName() + TMP_SUFFIX);
> {code}
> And if WAL path is configured to another device there can be an exception 
> {{{}AtomicMoveNotSupportedException{}}}:
> {noformat}
> Caused by: java.nio.file.AtomicMoveNotSupportedException: 
> 0000000000000000.wal.tmp -> 
> /opt/ignite/ssd/data/wal/consistentId/0000000000000000.wal: Invalid 
> cross-device link
>         at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:394) ~[?:1.8.0_321]
>         at 
> sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262) 
> ~[?:1.8.0_321]
>         at java.nio.file.Files.move(Files.java:1395) ~[?:1.8.0_321]
>         at 
> org.apache.ignite.internal.processors.cache.persistence.wal.FileWriteAheadLogManager.formatWorkSegments(FileWriteAheadLogManager.java:3471){noformat}
> We should create temp files in the same directory as WAL segments (on the 
> same device).



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

Reply via email to