[jira] [Commented] (IGNITE-8661) WALItreater is not stopped if can not deserialize record
[ https://issues.apache.org/jira/browse/IGNITE-8661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16515737#comment-16515737 ] Dmitriy Govorukhin commented on IGNITE-8661: [~agoncharuk] I fixed your comments, please take a look again. > WALItreater is not stopped if can not deserialize record > - > > Key: IGNITE-8661 > URL: https://issues.apache.org/jira/browse/IGNITE-8661 > Project: Ignite > Issue Type: Bug >Affects Versions: 2.5 >Reporter: Dmitriy Govorukhin >Assignee: Dmitriy Govorukhin >Priority: Major > Fix For: 2.6 > > > Currently, we have the following code in RecordV1Serializer.readWithCrc: > {code:java} > static WALRecord readWithCrc(.) throws EOFException, > IgniteCheckedException { > > try (FileInput.Crc32CheckingFileInput in = in0.startRead(skipCrc)) { > . > } > catch (EOFException | SegmentEofException | > WalSegmentTailReachedException e) { > throw e; > } > catch (Exception e) { > throw new IgniteCheckedException("Failed to read WAL record at > position: " + startPos, e); > } > } > {code} > So, any runtime error will be remapped to IgniteCheckedException, which will > lead to iterator stop due to the following code: > AbstractWalRecordsIterator.advanceRecord: > {code} >try { > .. > } > catch (IOException | IgniteCheckedException e) { > if (e instanceof WalSegmentTailReachedException) > throw (WalSegmentTailReachedException)e; > if (!(e instanceof SegmentEofException)) > handleRecordException(e, actualFilePtr); > return null; > } > {code} > Any IgniteCheckedException will be ignored and iterator goes ahead to the > next segment. > I suggest to make the following changes: > 1) It is unexpected behavior, need to fix it. We should only stop iteration > on known exceptions > 2) Also, need to provide ability skip records by type or some pointer for the > StandaloneWalRecordsIterator -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-8661) WALItreater is not stopped if can not deserialize record
[ https://issues.apache.org/jira/browse/IGNITE-8661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16515582#comment-16515582 ] Alexey Goncharuk commented on IGNITE-8661: -- Dmitriy, I have comments regarding the changes in DatabaseSharedManager. I think it makes sense to create an object which will contain the recovery state - lastRead, needMemoryRecovery, lastArchivedSegment and will implement the Supplier interface. This will be more readable, because currently you use AtomicReference as a container rather than as a synchronization primitive. > WALItreater is not stopped if can not deserialize record > - > > Key: IGNITE-8661 > URL: https://issues.apache.org/jira/browse/IGNITE-8661 > Project: Ignite > Issue Type: Bug >Affects Versions: 2.5 >Reporter: Dmitriy Govorukhin >Assignee: Dmitriy Govorukhin >Priority: Major > Fix For: 2.6 > > > Currently, we have the following code in RecordV1Serializer.readWithCrc: > {code:java} > static WALRecord readWithCrc(.) throws EOFException, > IgniteCheckedException { > > try (FileInput.Crc32CheckingFileInput in = in0.startRead(skipCrc)) { > . > } > catch (EOFException | SegmentEofException | > WalSegmentTailReachedException e) { > throw e; > } > catch (Exception e) { > throw new IgniteCheckedException("Failed to read WAL record at > position: " + startPos, e); > } > } > {code} > So, any runtime error will be remapped to IgniteCheckedException, which will > lead to iterator stop due to the following code: > AbstractWalRecordsIterator.advanceRecord: > {code} >try { > .. > } > catch (IOException | IgniteCheckedException e) { > if (e instanceof WalSegmentTailReachedException) > throw (WalSegmentTailReachedException)e; > if (!(e instanceof SegmentEofException)) > handleRecordException(e, actualFilePtr); > return null; > } > {code} > Any IgniteCheckedException will be ignored and iterator goes ahead to the > next segment. > I suggest to make the following changes: > 1) It is unexpected behavior, need to fix it. We should only stop iteration > on known exceptions > 2) Also, need to provide ability skip records by type or some pointer for the > StandaloneWalRecordsIterator -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (IGNITE-8661) WALItreater is not stopped if can not deserialize record
[ https://issues.apache.org/jira/browse/IGNITE-8661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16505850#comment-16505850 ] ASF GitHub Bot commented on IGNITE-8661: GitHub user DmitriyGovorukhin opened a pull request: https://github.com/apache/ignite/pull/4155 IGNITE-8661 WALItreater is not stopped if can not deserialize record You can merge this pull request into a Git repository by running: $ git pull https://github.com/gridgain/apache-ignite ignite-8661 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/ignite/pull/4155.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #4155 commit e57074824be2e114c8d8607f43f66c028a06d860 Author: Dmitriy Govorukhin Date: 2018-06-01T11:53:48Z IGNITE-8661 add IteratorParametersBuilder + refactoring commit fc63c038e15dd49e7114fad0083af2c0e90e2b98 Author: Dmitriy Govorukhin Date: 2018-06-01T13:13:57Z IGNITE-8661 refactoring commit 667fea64a99c2dcc4ad9c173a96f2d345fafffc2 Author: Dmitriy Govorukhin Date: 2018-06-07T11:10:27Z IGNITE-8661 commit d64289500c21db130416de2e094a06a44486f2d1 Author: Dmitriy Govorukhin Date: 2018-06-07T16:51:51Z IGNITE-8661 wip commit 2706b2bc6cb008c3f921c2b1ba33a9aca18ab412 Author: Dmitriy Govorukhin Date: 2018-06-08T09:18:02Z Merge branch 'master' into ignite-8661 > WALItreater is not stopped if can not deserialize record > - > > Key: IGNITE-8661 > URL: https://issues.apache.org/jira/browse/IGNITE-8661 > Project: Ignite > Issue Type: Bug >Reporter: Dmitriy Govorukhin >Assignee: Dmitriy Govorukhin >Priority: Major > Fix For: 2.6 > > > Currently, we have the following code in RecordV1Serializer.readWithCrc: > {code:java} > static WALRecord readWithCrc(.) throws EOFException, > IgniteCheckedException { > > try (FileInput.Crc32CheckingFileInput in = in0.startRead(skipCrc)) { > . > } > catch (EOFException | SegmentEofException | > WalSegmentTailReachedException e) { > throw e; > } > catch (Exception e) { > throw new IgniteCheckedException("Failed to read WAL record at > position: " + startPos, e); > } > } > {code} > So, any runtime error will be remapped to IgniteCheckedException, which will > lead to iterator stop due to the following code: > AbstractWalRecordsIterator.advanceRecord: > {code} >try { > .. > } > catch (IOException | IgniteCheckedException e) { > if (e instanceof WalSegmentTailReachedException) > throw (WalSegmentTailReachedException)e; > if (!(e instanceof SegmentEofException)) > handleRecordException(e, actualFilePtr); > return null; > } > {code} > Any IgniteCheckedException will be ignored and iterator goes ahead to the > next segment. > I suggest to make the following changes: > 1) It is unexpected behavior, need to fix it. We should only stop iteration > on known exceptions > 2) Also, need to provide ability skip records by type or some pointer for the > StandaloneWalRecordsIterator -- This message was sent by Atlassian JIRA (v7.6.3#76005)