File tree Expand file tree Collapse file tree
modules/module-slatedb-storage/src/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 DbBuilder ,
88 DbReader ,
99 DbReaderBuilder ,
10- FlushType ,
1110 KeyRange ,
1211 ObjectStore ,
1312 Settings ,
@@ -144,16 +143,7 @@ export class SlateDBKVStore implements AsyncDisposable {
144143 }
145144
146145 async flush ( ) : Promise < void > {
147- const batch = new WriteBatch ( ) ;
148- try {
149- batch . put (
150- toKeyBytes ( storageKey ( 'meta' , 'durability-barrier' ) ) ,
151- encodeValue ( { id : ++ this . durabilityBarrierId , flushed_at : new Date ( ) . toISOString ( ) } )
152- ) ;
153- await this . db . write_with_options ( batch , DURABLE_WRITE_OPTIONS ) ;
154- } finally {
155- batch . dispose ( ) ;
156- }
146+ await this . db . flush ( ) ;
157147 }
158148
159149 scanPrefix < T = unknown > (
@@ -167,7 +157,6 @@ export class SlateDBKVStore implements AsyncDisposable {
167157 options : { name ?: string ; lifetimeMs ?: number | bigint } = { }
168158 ) : Promise < CheckpointCreateResult > {
169159 await this . flush ( ) ;
170- await this . db . flush_with_options ( { flush_type : FlushType . MemTable } ) ;
171160 return this . admin . create_detached_checkpoint ( {
172161 name : options . name ,
173162 lifetime_ms : options . lifetimeMs ,
You can’t perform that action at this time.
0 commit comments