Skip to content

Avoid cache misses: Use Sidekiq.dump_json to serialize arguments

Bob Van Landuyt requested to merge bvl-idempotency-serialization-using-json into master

What does this MR do?

This will serialize the arguments into JSON, just like Sidekiq would for calculating the #idempotency_string and checking for duplicate jobs.

This would be a more robust approach, because serialization of for example symbols would currently be different when serialized on the clientside versus after they have been loaded from redis.

It would not have affected anything on a running instance, because the key is already serialized into the job hash and checked like that in Sidekiq server.

Last step in gitlab-com/gl-infra/scalability#1090 (closed)

Conformity

Availability and Testing

Edited by Alex Kalderimis

Merge request reports

Loading