File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
scala/com/scalableminds/fossildb Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,13 @@ message RestoreFromBackupReply {
130130 optional string errorMessage = 2 ;
131131}
132132
133+ message CompactAllDataRequest {}
134+
135+ message CompactAllDataReply {
136+ required bool success = 1 ;
137+ optional string errorMessage = 2 ;
138+ }
139+
133140
134141service FossilDB {
135142 rpc Health (HealthRequest ) returns (HealthReply ) {}
@@ -143,4 +150,5 @@ service FossilDB {
143150 rpc ListVersions (ListVersionsRequest ) returns (ListVersionsReply ) {}
144151 rpc Backup (BackupRequest ) returns (BackupReply ) {}
145152 rpc RestoreFromBackup (RestoreFromBackupRequest ) returns (RestoreFromBackupReply ) {}
153+ rpc CompactAllData (CompactAllDataRequest ) returns (CompactAllDataReply ) {}
146154}
Original file line number Diff line number Diff line change @@ -90,6 +90,10 @@ class FossilDBGrpcImpl(storeManager: StoreManager)
9090 RestoreFromBackupReply (true )
9191 } {errorMsg => RestoreFromBackupReply (false , errorMsg)}
9292
93+ override def compactAllData (req : CompactAllDataRequest ) = withExceptionHandler(req) {
94+ storeManager.compactAllData
95+ CompactAllDataReply (true )
96+ } {errorMsg => CompactAllDataReply (false , errorMsg)}
9397
9498 private def withExceptionHandler [T , R <: GeneratedMessage ](request : R )(tryBlock : => T )(onErrorBlock : Option [String ] => T ): Future [T ] = {
9599 try {
You can’t perform that action at this time.
0 commit comments