Releases: Tapjoy/chore
v4.5.0
- Replace json with multi_json so that the application decides with json implementation to use
- Remove thread dependency as we're not relying on any of its functionality
- Relax version pinning on dependencies
- Remove unused development dependencies
- Update specs to rspec 3 syntax
- Update ruby version to 2.7.6
v4.4.0: Address race condition in dedupe handler
Full Changelog: v4.3.0...v4.4.0
SQS messages were observed being removed well before they should have been based on SQS queue re-drive and visibility policies. After some discussion and investigation, it was determined that a race condition in the deduplication logic was causing messages to be removed from the queue before expiry of the effective retention window. This race condition happens when:
- A message is consumed from the SQS queue
- A record is added to the dedupe cache with a TTL based on the SQS queue's visibility timeout
- this is the standard pattern
Between 1 and 2 some time passes, which was observed to be up to 2 seconds. Sometimes the message in the SQS queue is re-consumed before its record in the dedupe cache expires, causing the message to be removed from the queue early.
This issue is fixed by introducing a timeout_offset
to the duplicate detection logic. The dedupe cache record TTL will be set with a timeout_offset
-seconds shorter duration than the SQS queue's visibility timeout. While this introduces a surface area for duplicated work, the probability of such duplication is much higher in the first few seconds after a message is first consumed rather than the last few seconds before that message hits its visibility timeout.
v4.3.0: Support custom dedupe handlers
Removes hard dependency on Dalli (and thus memcache) for duplicate detection.
Add `around_publish` and `around_perform` job hooks
- Added
around_publish
Job hook with parametersqueue_name
,job_hash
, and&blk
. - Added
around_perform
Job hook with parametersklass
,message
, and&blk
.
Stop appending `_` to CLI `--queue_prefix` option
Instead, the entire prefix should be managed by the application consuming Chore. This allows for any logic that sets the queue prefix to be the same between a Chorefile
(for consuming messages) and any Chore initializers (usually for publishing messages) in the application.
Update AWS SDK library
Features
- AWS SDK library has been updated to support AWS authentication via
Web Federated Identity- The API has jumped ahead 2 major versions, so some of the internals (e.g.
Chore::UnitOfWork
) had to be changed to accommodate its changes. In the end, however,
this update is designed to function as a drop-in replacement for earlier versions of Chore
- The API has jumped ahead 2 major versions, so some of the internals (e.g.
Fixed bugs
- Some of the SQS specs were not actually testing output values
Cleanups
- Many more YARD docs
- Documented the release process
- Mild overhaul of the base README
Clean shutdown master on restart
v2.0.4 Update version to 2.0.4