Commit Graph

11 Commits (678728de6d38a60667b3390b3e0c28f99ff041d9)

Author SHA1 Message Date
UtopiaGitHub 678728de6d
🐛 [Bug-Fix]: add lock to avoid data race #2360 (#2368)
Update memory.go

The fix is to protect the access to s.db and save the result to a local variable.
2023-03-14 11:41:48 +01:00
leonklingele a0645af1ed
Fix and optimize memory storage (#2207)
* internal/memory: cache timestamp

* internal/memory: ensure to never delete non-expired items

This fixes a TOCTOU problem between a mutex rlock and a mutex lock.

* internal/memory: move costly operations outside of locked area

* internal/storage: cache timestamp

* internal/storage: ensure to never delete non-expired items

This fixes a TOCTOU problem between a mutex rlock and a mutex lock.

* internal/storage: move costly operations outside of locked area
2022-11-14 08:21:03 +01:00
RW ce2d087394
Improve memory storage (#2162)
* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance

* improve memory storage code and performance
2022-10-19 16:22:42 +02:00
RW 3e8227d7eb
FIX: panic: unaligned 64-bit atomic operation [32 bit machines] #1487 (#1502)
* 🐛 panic: unaligned 64-bit atomic operation [32 bit machines] #1487
https://pkg.go.dev/sync/atomic#pkg-notes
https://go101.org/article/memory-layout.html
https://github.com/golang/go/issues/36606

* 🐛 panic: unaligned 64-bit atomic operation [32 bit machines] #1487
change from uin64 to uint32 for the timestamp -> max value is 4294967295 -> Sun Feb 07 2106 06:28:15 GMT+0000
2021-08-22 10:28:34 +02:00
TroyDota 80fadc607c
Update memory.go 2021-02-15 04:07:51 +02:00
Fenny e28c886d73 🩹 fix internal memory storage 2020-12-03 11:14:33 +01:00
Fenny 8fe458011d 📦 add mapstore 2020-11-20 11:43:07 +01:00
Fenny 6ded637712 🩹 update store logic 2020-11-18 09:02:42 +01:00
Fenny a98fb7a5f8 🩹 allow to disable BodySize
Co-Authored-By: Kirill Danshin <9026581+kirillDanshin@users.noreply.github.com>
2020-11-18 08:57:27 +01:00
Fenny 573853d440 🔍 add len check 2020-11-12 20:14:10 +01:00
Fenny 015de85e30 💼 update session 2020-11-06 19:43:57 +01:00