mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-17 11:24:44 -07:00
Small changes to event ids, good approach though with separate lock on account
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -211,7 +211,8 @@ type Server struct {
|
||||
m sync.Map
|
||||
}
|
||||
|
||||
eventids *nuid.NUID
|
||||
// For eventIDs
|
||||
eventIds *nuid.NUID
|
||||
}
|
||||
|
||||
// Make sure all are 64bits for atomic use
|
||||
@@ -277,17 +278,16 @@ func NewServer(opts *Options) (*Server, error) {
|
||||
now := time.Now()
|
||||
|
||||
s := &Server{
|
||||
kp: kp,
|
||||
configFile: opts.ConfigFile,
|
||||
info: info,
|
||||
prand: rand.New(rand.NewSource(time.Now().UnixNano())),
|
||||
opts: opts,
|
||||
done: make(chan bool, 1),
|
||||
start: now,
|
||||
configTime: now,
|
||||
gwLeafSubs: NewSublistWithCache(),
|
||||
httpBasePath: httpBasePath,
|
||||
eventids: nuid.New(),
|
||||
kp: kp,
|
||||
configFile: opts.ConfigFile,
|
||||
info: info,
|
||||
prand: rand.New(rand.NewSource(time.Now().UnixNano())),
|
||||
opts: opts,
|
||||
done: make(chan bool, 1),
|
||||
start: now,
|
||||
configTime: now,
|
||||
gwLeafSubs: NewSublistWithCache(),
|
||||
eventIds: nuid.New(),
|
||||
}
|
||||
|
||||
// Trusted root operator keys.
|
||||
|
||||
Reference in New Issue
Block a user