From 9da43c7af4b8b94117523c0235e207e7d0a8e065 Mon Sep 17 00:00:00 2001 From: Steven Ontong Date: Tue, 29 Oct 2024 09:28:57 +0200 Subject: [PATCH 1/2] fix: custom write checkpoint logic --- .../commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt b/core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt index 1221911e..4a53ec7d 100644 --- a/core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt +++ b/core/src/commonMain/kotlin/com/powersync/db/PowerSyncDatabaseImpl.kt @@ -252,7 +252,7 @@ internal class PowerSyncDatabaseImpl( writeTransaction { tx -> internalDb.queries.deleteEntriesWithIdLessThan(lastTransactionId.toLong()) - if (writeCheckpoint != null && bucketStorage.hasCrud()) { + if (writeCheckpoint != null && !bucketStorage.hasCrud()) { tx.execute( "UPDATE ps_buckets SET target_op = CAST(? AS INTEGER) WHERE name='\$local'", listOf(writeCheckpoint), From 9650b3d49ffce1b8f52a0b0a49083a4a1f764464 Mon Sep 17 00:00:00 2001 From: Steven Ontong Date: Tue, 29 Oct 2024 09:34:47 +0200 Subject: [PATCH 2/2] chore: changelog entry and version bump --- CHANGELOG.md | 3 +++ gradle.properties | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27f7ee1a..18318ccc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## 1.0.0-BETA6 + +* Fix Custom Write Checkpoint application logic ## 1.0.0-BETA5 diff --git a/gradle.properties b/gradle.properties index 076adac7..e7d9ef39 100644 --- a/gradle.properties +++ b/gradle.properties @@ -17,7 +17,7 @@ development=true RELEASE_SIGNING_ENABLED=true # Library config GROUP=com.powersync -LIBRARY_VERSION=1.0.0-BETA5 +LIBRARY_VERSION=1.0.0-BETA6 GITHUB_REPO=https://github.com/powersync-ja/powersync-kotlin.git # POM POM_URL=https://github.com/powersync-ja/powersync-kotlin/