Fixed
Status Update
Comments
mi...@gmail.com <mi...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit e1b4be5ef6f009bd83740cdb2be1877511475c46
Author: pingxuanli <pingxuanli@google.com>
Date: Mon Aug 15 13:45:21 2022
Removed the restriction for Upsert annotation
Bug: 241964353
Test: Tests for @Upsert Annotation are in `UpsertTest.kt` file
Relnote: Adding @Upsert Annotation, which attempt to insert an entity when there is no conflict and update the entity if there is a conflict.
Change-Id: I7aaab5416551ed70e0130a60b6b629a531757a16
M room/room-common/api/current.txt
M room/room-common/src/main/java/androidx/room/Upsert.kt
M room/room-common/api/public_plus_experimental_current.txt
M room/room-common/api/restricted_current.txt
https://android-review.googlesource.com/2184904
Branch: androidx-main
commit e1b4be5ef6f009bd83740cdb2be1877511475c46
Author: pingxuanli <pingxuanli@google.com>
Date: Mon Aug 15 13:45:21 2022
Removed the restriction for Upsert annotation
Bug: 241964353
Test: Tests for @Upsert Annotation are in `UpsertTest.kt` file
Relnote: Adding @Upsert Annotation, which attempt to insert an entity when there is no conflict and update the entity if there is a conflict.
Change-Id: I7aaab5416551ed70e0130a60b6b629a531757a16
M room/room-common/api/current.txt
M room/room-common/src/main/java/androidx/room/Upsert.kt
M room/room-common/api/public_plus_experimental_current.txt
M room/room-common/api/restricted_current.txt
ra...@google.com <ra...@google.com>
ra...@google.com <ra...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 40e15ece328da2b94a516610ecda8541ad776086
Author: pingxuanli <pingxuanli@google.com>
Date: Tue Aug 16 16:56:06 2022
Adding SuspendingQueryTest for @Upsert including upsert without returns and upsert with Long and List<Long> as return types
Bug: 241964353
Test: The tests for upsert with suspend is inside file `SuspendingQueryTest`
Change-Id: I4996de64884651c245ab144e3481d027382c86e3
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
https://android-review.googlesource.com/2188580
Branch: androidx-main
commit 40e15ece328da2b94a516610ecda8541ad776086
Author: pingxuanli <pingxuanli@google.com>
Date: Tue Aug 16 16:56:06 2022
Adding SuspendingQueryTest for @Upsert including upsert without returns and upsert with Long and List<Long> as return types
Bug: 241964353
Test: The tests for upsert with suspend is inside file `SuspendingQueryTest`
Change-Id: I4996de64884651c245ab144e3481d027382c86e3
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/SuspendingQueryTest.kt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/dao/BooksDao.kt
mi...@gmail.com <mi...@gmail.com> #4
Thanks for the quick fix. Any ideas when the next release will be? If not I'll try and work around this issue by implementing some kind of rate limiter and replacing the bad worker if it fires too many times.
su...@google.com <su...@google.com> #5
I would expect the next release within the next ~2 weeks, but I can't guarantee that.
Description
Version used: 1.0.0-alpha10
Devices/Android versions reproduced on: Android 4.4 API 19 Emulator
The bug is pretty easy to reproduce:
1. Boot up a brand new emulator (Android 4.4 API 19), and set the time to current time minus one year
2. Now run an app that enqueues a unique periodic work using the api enqueueUniquePeriodicWork
3. Now change the time of the device back to present time
4. Notice the unique periodic work goes into an endless loop. The only way to fix this issue is to enqueue again, using ExistingPeriodicWorkPolicy.REPLACE