Fixed
Status Update
Comments
el...@google.com <el...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 022f8ba4ca335012f58a7ba4c875a071c42fc0ec
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Sep 19 13:47:53 2024
Use deferred transaction in room-paging.
The root cause of this issue is that when using a Room database that is not an in-memory database (which is what is used in most of our tests), the incorrect usage of a write transaction using a read connection was not caught, as an in-memory database's connection pool only has 1 connection provided, which is a "write" connection by default. Therefore, the incorrect usage of the write transaction using the `immediateTransaction` API was not caught by the tests. This CL adds a test that uses a `databaseBuilder()` to ensure this issue is fixed.
Bug: 368380988
Test: Existing
Change-Id: Ibc96d18400cc366d58a158e6fa5feff9e377402a
A room/integration-tests/multiplatformtestapp/src/androidInstrumentedTest/kotlin/androidx/room/integration/multiplatformtestapp/test/PagingTest.kt
A room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BasePagingTest.kt
M room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BaseQueryTest.kt
A room/integration-tests/multiplatformtestapp/src/jvmTest/kotlin/androidx/room/integration/multiplatformtestapp/test/PagingTest.kt
A room/integration-tests/multiplatformtestapp/src/nativeTest/kotlin/androidx/room/integration/multiplatformtestapp/test/PagingTest.kt
M room/room-paging/src/commonMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
https://android-review.googlesource.com/3277779
Branch: androidx-main
commit 022f8ba4ca335012f58a7ba4c875a071c42fc0ec
Author: elifbilgin <elifbilgin@google.com>
Date: Thu Sep 19 13:47:53 2024
Use deferred transaction in room-paging.
The root cause of this issue is that when using a Room database that is not an in-memory database (which is what is used in most of our tests), the incorrect usage of a write transaction using a read connection was not caught, as an in-memory database's connection pool only has 1 connection provided, which is a "write" connection by default. Therefore, the incorrect usage of the write transaction using the `immediateTransaction` API was not caught by the tests. This CL adds a test that uses a `databaseBuilder()` to ensure this issue is fixed.
Bug: 368380988
Test: Existing
Change-Id: Ibc96d18400cc366d58a158e6fa5feff9e377402a
A room/integration-tests/multiplatformtestapp/src/androidInstrumentedTest/kotlin/androidx/room/integration/multiplatformtestapp/test/PagingTest.kt
A room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BasePagingTest.kt
M room/integration-tests/multiplatformtestapp/src/commonTest/kotlin/androidx/room/integration/multiplatformtestapp/test/BaseQueryTest.kt
A room/integration-tests/multiplatformtestapp/src/jvmTest/kotlin/androidx/room/integration/multiplatformtestapp/test/PagingTest.kt
A room/integration-tests/multiplatformtestapp/src/nativeTest/kotlin/androidx/room/integration/multiplatformtestapp/test/PagingTest.kt
M room/room-paging/src/commonMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt
pr...@google.com <pr...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.room:room-paging:2.7.0-alpha09
androidx.room:room-paging-android:2.7.0-alpha09
androidx.room:room-paging-iosarm64:2.7.0-alpha09
androidx.room:room-paging-iossimulatorarm64:2.7.0-alpha09
androidx.room:room-paging-iosx64:2.7.0-alpha09
androidx.room:room-paging-jvm:2.7.0-alpha09
androidx.room:room-paging-linuxarm64:2.7.0-alpha09
androidx.room:room-paging-macosx64:2.7.0-alpha09
wo...@gmail.com <wo...@gmail.com> #4
My old legally account activists on my Google account place.
Description
The room-paging KMP integration on initial load starts an 'immediate' transaction which grabs a 'write' lock immediately on a reader connection which is illegal:
Seehttps://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:room/room-paging/src/commonMain/kotlin/androidx/room/paging/LimitOffsetPagingSource.kt;l=112-113