fix(app): bound Android provider snapshot storage (#3234)

Android AsyncStorage's 6 MiB SQLite ceiling was exhausted by per-workspace provider snapshots with no eviction. Raise the native cap to 10 MiB and bound snapshots to 4 MiB with indexed eviction, clearing legacy unindexed data without scanning payloads on every save.
This commit is contained in:
Mohamed Boudra
2026-08-11 22:00:21 +02:00
committed by GitHub
parent 40bdb9a043
commit 7b167784d7
5 changed files with 678 additions and 42 deletions
@@ -0,0 +1,24 @@
const { withGradleProperties } = require("expo/config-plugins");
const ASYNC_STORAGE_SIZE_PROPERTY = "AsyncStorage_db_size_in_MB";
function withAndroidAsyncStorageSize(config, sizeInMegabytes) {
return withGradleProperties(config, (modConfig) => {
const existingProperty = modConfig.modResults.find(
(property) => property.type === "property" && property.key === ASYNC_STORAGE_SIZE_PROPERTY,
);
if (existingProperty?.type === "property") {
existingProperty.value = String(sizeInMegabytes);
return modConfig;
}
modConfig.modResults.push({
type: "property",
key: ASYNC_STORAGE_SIZE_PROPERTY,
value: String(sizeInMegabytes),
});
return modConfig;
});
}
module.exports = withAndroidAsyncStorageSize;