Skip to content

Commit

Permalink
Merge pull request #616 from ApptiveGrid/fix-halt-SoilIndexConsistenc…
Browse files Browse the repository at this point in the history
…yVisitor
  • Loading branch information
noha authored Feb 16, 2024
2 parents f01ee6d + 3719c96 commit 1773651
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Soil-Core/SoilIndexConsistencyVisitor.class.st
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Class {
#name : #SoilIndexConsistencyVisitor,
#superclass : #SoilInstanceVisitor,
#category : #'Soil-Core-Model'
#category : #'Soil-Core-Visitor'
}

{ #category : #api }
Expand All @@ -17,5 +17,5 @@ SoilIndexConsistencyVisitor >> visitPagedFileIndexStore: aSoilPagedFileIndexStor
1 to: numberOfPages do: [ :pageIndex | | page |
page := aSoilPagedFileIndexStore pageAt: pageIndex.
(page right allSatisfy: #isZero) ifTrue: [
(page index = numberOfPages) ifFalse: [ self halt ] ] ]
(page index = numberOfPages) ifFalse: [ Error signal: 'Index consistency check failed ' ] ] ]
]
4 changes: 2 additions & 2 deletions src/Soil-Core/SoilJournalConsistencyVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SoilJournalConsistencyVisitor >> verifyDatabaseVersion: aSoilTransactionJournal
"after initialization the database version should always be
one larger than the one before"
(entry value = (databaseVersion + 1)) ifFalse: [
Error signal: 'nope' ].
Error signal: 'Journal consistency check failed: #verifyDatabaseVersion:' ].
databaseVersion := entry value
]

Expand All @@ -42,7 +42,7 @@ SoilJournalConsistencyVisitor >> verifyObjectIndexes: aSoilTransactionJournal [
at: entry objectId segment
ifAbsentPut: [ entry objectId index - 1].
(newIndex >= oldIndex) ifFalse: [
Error signal: 'nope' ].
Error signal: 'Journal consistency check failed: #verifyObjectIndexes:' ].
segments
at: entry objectId segment
put: newIndex ]
Expand Down

0 comments on commit 1773651

Please sign in to comment.