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

Ignite TC Bot commented on IGNITE-19034:
----------------------------------------

"Snapshot: Fixed control.sh --snapshot status to report snapshot checks and 
restore progress while checks are running."

The Release Note field has been filled with the wording above. Please review it 
and edit it if needed.

> VisorSnapshotStatusTask returns empty result for restoring snapshot until 
> snapshot check is completed
> -----------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-19034
>                 URL: https://issues.apache.org/jira/browse/IGNITE-19034
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Ilya Shishkov
>            Assignee: Vladimir Steshin
>            Priority: Major
>              Labels: iep-43, ise
>             Fix For: 2.20
>
>         Attachments: SnapshotStatusReproducerTest.patch
>
>          Time Spent: 7h
>  Remaining Estimate: 0h
>
> Currently, snapshot check is performed under the hood during restoring of a 
> snapshot. For big snapshots check operation execution can take a long time.
> In such case, if you call two similar commands, they will return different 
> results:
> Deprecated command _restore --status_ shows, that snapshot operation is in 
> progress:
> {noformat}
> Command [SNAPSHOT] started
> Arguments: --snapshot restore test_snapshot --status 
> --------------------------------------------------------------------------------
> Command deprecated. Use '--snapshot status' instead.
> Snapshot cache group restore operation is running [snapshot=test_snapshot]
> Command [SNAPSHOT] finished with code: 0
> {noformat}
> But actual command _--snapshot status_ does not show that any snapshot 
> operation is running:
> {noformat}
> Command [SNAPSHOT] started
> Arguments: --snapshot status 
> --------------------------------------------------------------------------------
> There is no create or restore snapshot operation in progress.
> Command [SNAPSHOT] finished with code: 0
> {noformat}
> {{VisorSnapshotStatusTask.java}} rely on snapshot restore metrics[1]. This 
> metrics are extracted from {{SnapshotRestoreProcess#lastOpCtx}} [2], which is 
> updated in {{SnapshotRestoreProcess#prepare}} [3], _but this method called 
> after snapshot check is finished_ [4, 5].
> Here is a reproducer: [^SnapshotStatusReproducerTest.patch] 
> Links:
> # 
> https://github.com/apache/ignite/blob/a8e16899514348ed7b9404e7d122ed430f8e1acd/modules/core/src/main/java/org/apache/ignite/internal/visor/snapshot/VisorSnapshotStatusTask.java#L141
> # 
> https://github.com/apache/ignite/blob/a8e16899514348ed7b9404e7d122ed430f8e1acd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java#L245
> # 
> https://github.com/apache/ignite/blob/a8e16899514348ed7b9404e7d122ed430f8e1acd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java#L670
> # 
> https://github.com/apache/ignite/blob/a8e16899514348ed7b9404e7d122ed430f8e1acd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java#L414
> # 
> https://github.com/apache/ignite/blob/a8e16899514348ed7b9404e7d122ed430f8e1acd/modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotRestoreProcess.java#L205



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to