atsign-foundation / at_server

The software implementation of Atsign's core technology
https://docs.atsign.com
BSD 3-Clause "New" or "Revised" License
40 stars 12 forks source link

compaction issue with daily3bossanova #469

Closed murali-shris closed 2 years ago

murali-shris commented 2 years ago

Lead: @murali-shris (please update if labeled incorrectly)

a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | FINER|2022-01-14 07:00:00.152231|TimeBasedCompaction|Number of entries in Instance of 'AtAccessLog' before size compaction - 21 a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | FINER|2022-01-14 07:00:00.187647|TimeBasedCompaction|performing size compaction for Instance of 'AtAccessLog': Number of expired keys: 6 a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | Unhandled exception: a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | type 'Null' is not a subtype of type 'num' of 'other' a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #0 _IntegerImplementation.compareTo (dart:core-patch/integers.dart) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #1 CommitLogKeyStore.getDuplicateEntries. (package:at_persistence_secondary_server/src/log/commitlog/commit_log_keystore.dart) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #2 Sort._dualPivotQuicksort (dart:_internal/sort.dart:238) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #3 Sort._doSort (dart:_internal/sort.dart:60) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #4 Sort.sort (dart:_internal/sort.dart:33) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #5 ListMixin.sort (dart:collection/list.dart:356) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #6 CommitLogKeyStore.getDuplicateEntries (package:at_persistence_secondary_server/src/log/commitlog/commit_log_keystore.dart:201) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #7 CommitLogKeyStore.getExpired (package:at_persistence_secondary_server/src/log/commitlog/commit_log_keystore.dart:191) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 | #8 TimeBasedCompaction.performCompaction (package:at_persistence_secondary_server/src/compaction/at_time_based_compaction.dart:18) a969e972-fa7d-5b2d-a1f1-ad7675de5c43_secondary.1.kg0rpsvobgz8@hornet-13 |

srieteja commented 2 years ago

CommitLogKeyStore| CommitID is null for cached:public:firstname.wavi@lentres. This is the entry that caused this issue. I have also looked at other cached:public keys and none of them have commitID as null. This is the only occurrence where commitID is null. Screenshot from 2022-01-25 11-56-55

srieteja commented 2 years ago

Pushed a defensive fix to ignore CommitEntries with commitId equal to null while sorting in https://github.com/atsign-foundation/at_server/pull/493

sitaram-kalluri commented 2 years ago

The changes are pushed to canary servers, Need to verify the fix once the changes are pushed to production servers. Moving to next sprint. 3 SP burned down in PR 29 Core. Adding 2 SP to verify the fix.