@@ -7,18 +7,15 @@ import com.powersync.sync.SyncDataBatch
7
7
import com.powersync.sync.SyncLocalDatabaseResult
8
8
import co.touchlab.stately.concurrency.AtomicBoolean
9
9
import kotlinx.serialization.encodeToString
10
- import com.benasher44.uuid.uuid4
11
10
import com.powersync.db.internal.InternalTable
12
11
import com.powersync.utils.JsonUtil
13
- import kotlinx.coroutines.runBlocking
14
12
15
13
internal class BucketStorage (
16
14
private val db : PsInternalDatabase ,
17
15
private val logger : Logger
18
16
) {
19
17
private val tableNames: MutableSet <String > = mutableSetOf ()
20
18
private var hasCompletedSync = AtomicBoolean (false )
21
- private var checksumCache: ChecksumCache ? = null
22
19
private var pendingBucketDeletes = AtomicBoolean (false )
23
20
24
21
/* *
@@ -200,7 +197,7 @@ internal class BucketStorage(
200
197
)
201
198
}
202
199
203
- suspend fun validateChecksums (checkpoint : Checkpoint ): SyncLocalDatabaseResult {
200
+ private suspend fun validateChecksums (checkpoint : Checkpoint ): SyncLocalDatabaseResult {
204
201
val res = db.getOptional(
205
202
" SELECT powersync_validate_checkpoint(?) as result" ,
206
203
parameters = listOf (JsonUtil .json.encodeToString(checkpoint)),
@@ -232,7 +229,7 @@ internal class BucketStorage(
232
229
}
233
230
}
234
231
235
- suspend fun forceCompact () {
232
+ private suspend fun forceCompact () {
236
233
// Reset counter
237
234
this .compactCounter = COMPACT_OPERATION_INTERVAL
238
235
this .pendingBucketDeletes.value = true
@@ -241,7 +238,7 @@ internal class BucketStorage(
241
238
}
242
239
243
240
244
- suspend fun autoCompact () {
241
+ private suspend fun autoCompact () {
245
242
// 1. Delete buckets
246
243
deletePendingBuckets()
247
244
0 commit comments