189
r.store.VisitUpdates(func(updID string, updInfo *persistencespb.UpdateInfo) {
190
if updInfo.GetAdmission() != nil {
191
>
// An Update entry in the Registry may have a request payload: we use this to write the payload to an
registry.go
192
>
// UpdateAccepted event, in the event that the Update is accepted. However, when populating the registry
193
>
// from mutable state, we do not have access to Update request payloads. In this situation it is correct
194
>
// to create a registry entry in state Admitted with a nil payload for the following reason: the fact
195
>
// that we have encountered an UpdateInfo in stateAdmitted in mutable state implies that there is an
196
>
// UpdateAdmitted event in history; and when there is an UpdateAdmitted event in history, we will not
197
>
// attempt to write the request payload to the UpdateAccepted event, since the request payload is
198
>
// already present in the UpdateAdmitted event.
199
>
r.updates[updID] = newAdmitted(
200
>
updID,
201
>
nil,
202
>
r.remover(updID),
203
>
withInstrumentation(&r.instrumentation),
204
>
)
205
} else if acc := updInfo.GetAcceptance(); acc != nil {
206
u := newAccepted(