418
419
// Checks if data in db has not been modified since we loaded/modified it.
420
>
func (m *userDataManagerImpl) refreshUserDataFromDB(ctx context.Context) error {
user_data_manager.go
421
>
// Lock here to ensure we're not in the middle of an update, otherwise we may incorrectly
422
>
// think the db has old data if we update between read and verify.
423
>
m.lock.Lock()
424
>
defer m.lock.Unlock()
425
>
426
>
response, err := m.store.GetTaskQueueUserData(ctx, &persistence.GetTaskQueueUserDataRequest{
427
>
NamespaceID: m.partition.NamespaceId(),
428
>
TaskQueue: m.partition.TaskQueue().Name(),
429
>
})
430
>
if common.IsNotFoundError(err) {
431
response, err = &persistence.GetTaskQueueUserDataResponse{}, nil
432
}
434
return err
435
}
436
438
>
return nil
439
>
}
440
441
tags := []tag.Tag{