Improved concurrency handling

This commit is contained in:
Pijus Kamandulis committed 2024-12-08 17:54:58 +02:00
1 parent 66ea859f34
commit e5ddc143f0
9 files changed
+117 -3

No files matched your search

+4
View File
@@ -1,5 +1,7 @@
package repositorymodels
import "sync"
type Database struct {
ID string `json:"id"`
TimeStamp int64 `json:"_ts"`
@@ -101,6 +103,8 @@ type PartitionKeyRange struct {
}
type State struct {
sync.RWMutex
// Map databaseId -> Database
Databases map[string]Database `json:"databases"`