Skip to content

Commit

Permalink
Delegate cleaning to index
Browse files Browse the repository at this point in the history
  • Loading branch information
noha committed Dec 23, 2024
1 parent 8cdc91a commit afb78f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 8 additions & 0 deletions src/Soil-Core/SoilIndex.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,14 @@ SoilIndex >> basicAt: key put: anObject [
put: anObject
]

{ #category : #'as yet unclassified' }
SoilIndex >> cleanUpToVersion: version [
SoilIndexCleaner new
index: self;
readVersion: version;
clean.
]

{ #category : #'open/close' }
SoilIndex >> close [
self store close.
Expand Down
5 changes: 1 addition & 4 deletions src/Soil-Core/SoilIndexManager.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,7 @@ SoilIndexManager >> dirtyIndexes [
SoilIndexManager >> flush [

dirtyIndexes copy do: [ :index |
SoilIndexCleaner new
index: index;
readVersion: (self soil transactionManager smallestReadVersion);
clean.
index cleanUpToVersion: (self soil transactionManager smallestReadVersion).
index dirtyPages ifEmpty: [ dirtyIndexes remove: index ] ]
]

Expand Down

0 comments on commit afb78f3

Please sign in to comment.