-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: ota_proxy: use simple-sqlite3-orm instead of vendoring an o…
…rm inside otaproxy package (#363) This PR introduces to use simple-sqlite3-orm package(which is also implemented by me) instead. This package is feature-rich, well-implemented and well-tested replacement for the vendored sqlite3 ORM inside the otaproxy package. Also this PR fixes a potential race condition, which the database entry being committed before the cache file being finalized, resulting small chance of cache file not found on database lookup hit. Other major changes * split cache_streaming related logic intocache_streaming module. * split lru_cache_helper from ota_cache module into lru_cache_helper module. * in lru_cache_helper, now we limit the max steps to walk down the bucket list when rotating the cache. * in db, now we use RETURNING statement when rotating cache on supported platform. * in ota_cache, now we also check db integrity to determine whether to force init.
- Loading branch information
1 parent
9d62901
commit 3a96776
Showing
13 changed files
with
942 additions
and
1,435 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.