Open tuancoltech opened 7 months ago
@tuancoltech am I right that we only need to bump arklib-android
version before merging?
@tuancoltech am I right that we only need to bump
arklib-android
version before merging?
@kirillt This PR doesn't depend on any change in arklib-android
, so please feel free to merge it :)
@tuancoltech there are some unresolved references in the last build.
Kudos, no new issues were introduced!
0 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Another concern is that the fix is applied to TagLabeledNStorage
, but there are also 3 other similar storages: TagLabeledTSStorage.kt
, TagQueriedTSStorage
, TagQueriedNStorage
. These storages have the same bug, they should be fixed, too.
But the best approach would be to re-design stats storages... They were implemented during autumn 2022. At summer 2023, we've refactored storages completely and separated reusable primitives. See FileStorage and FolderStorage from arklib-android.
In fact, the data stored in stats storages is very simple key-value mapping. I think, it's possible to implement them similarly to ScoreStorage. Scores storage is id-to-integer mapping, and stats storages are either tag-to-integer or tag-to-timestamp. But in any case, the code will be very similar to scores storage.
I think, it's possible to implement them similarly to ScoreStorage
They are not quite like ScoreStorage
. They can often receive new events (once per second), which will provoke overwriting of large file (there is only one for the entire root). Here we need to implement a new storage, which will have a debounce flush to disk for new entries.
I think there is no point in fixing them here; it’s better to move and refactor in arklib-android.
@mdrlzy good note about debouncing. We can implement such a parameter in our base storage classes. Then stats storage should be similar to score storage, just debounce parameter would differ.
@tuancoltech let me know if you need help with implementing StatsStorage
@tuancoltech let me know if you need help with implementing
StatsStorage
@kirillt Sure, I'll ask here in the case.
@tuancoltech We might need small refactoring in arklib-android
because BaseStorage
hard-codes ResourceId
as the type acceptable as keys of a storage. In case of tag stats, keys belong to the String
type.
:rocket: Summary
Fix crash in Android Navigator, Aggregation mode. Issue: https://github.com/ARK-Builders/ARK-Navigator/issues/412