Skip to content

Log Optimistic Locks with retries

Aleksei Lipniagov requested to merge 322125-log-optimistic-locking-retries into master

What does this MR do?

Uses structured logging for gathering info on Optimistic Locks which were not able to succeed without retries.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

The new log records may be observed in log/service_measurement.log when calling bin/spring rspec spec/lib/gitlab/optimistic_locking_spec.rb if to drop any expectations for the logger (so it would call the original).

Example log/service_measurement.log:

{"severity":"INFO","time":"...","correlation_id":"...","message":"Optimistic Lock released with retries","name":...,"retries":1,"time_s":0.099343}
{"severity":"INFO","time":"...","correlation_id":"...","message":"Optimistic Lock released with retries","name":"...","retries":1,"time_s":0.010951}

Security

N/A

Related to #322125 (closed)

Edited by Aleksei Lipniagov

Merge request reports