From e35e73df86d4c196b9a75d7b4d1b7357b8180038 Mon Sep 17 00:00:00 2001 From: Norbert Hartl Date: Thu, 18 Jan 2024 14:55:09 +0100 Subject: [PATCH] Prevent journal files from being processed on backup. Copy the journal fragment files as files --- src/Soil-Core/SoilBackupVisitor.class.st | 12 ++++++++++++ src/Soil-Core/SoilJournalFragmentFile.class.st | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/Soil-Core/SoilBackupVisitor.class.st b/src/Soil-Core/SoilBackupVisitor.class.st index 6a3d0ba4..cb0a7c42 100644 --- a/src/Soil-Core/SoilBackupVisitor.class.st +++ b/src/Soil-Core/SoilBackupVisitor.class.st @@ -76,6 +76,18 @@ SoilBackupVisitor >> target: aSoil [ target := aSoil ] +{ #category : #visiting } +SoilBackupVisitor >> visitDatabaseJournal: aSoilJournal [ + (target path / #journal) ensureCreateDirectory. + ^ super visitDatabaseJournal: aSoilJournal +] + +{ #category : #visiting } +SoilBackupVisitor >> visitJournalFragmentFile: aSoilJournalFragmentFile [ + aSoilJournalFragmentFile copyTo: target journal path / aSoilJournalFragmentFile basename. + ^ aSoilJournalFragmentFile +] + { #category : #visiting } SoilBackupVisitor >> visitMetaSegment: aSoilMetaSegment [ self visit: aSoilMetaSegment indexManager. diff --git a/src/Soil-Core/SoilJournalFragmentFile.class.st b/src/Soil-Core/SoilJournalFragmentFile.class.st index 623906f2..c9833805 100644 --- a/src/Soil-Core/SoilJournalFragmentFile.class.st +++ b/src/Soil-Core/SoilJournalFragmentFile.class.st @@ -34,11 +34,21 @@ SoilJournalFragmentFile >> appendEntry: aSoilJournalEntry [ ] +{ #category : #accessing } +SoilJournalFragmentFile >> basename [ + ^ path basename +] + { #category : #'initialize-release' } SoilJournalFragmentFile >> close [ stream close ] +{ #category : #copying } +SoilJournalFragmentFile >> copyTo: aPath [ + path copyTo: aPath +] + { #category : #'instance creation' } SoilJournalFragmentFile >> create [ path ensureCreateFile