| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
...but actually do this whole thing differently
|
| |
|
|
|
|
|
|
| |
Use a more specific regex to locate the old clean.dot files.
If reading an old clean.dot file fails, simply log the error.
Ensure that we close the dets table after our upgrade step has run.
|
|
|
|
|
|
|
|
| |
Rename rabbit_queue_index:{recover => start}/1.
Rename rabbit_shutdown_terms{recover => start}/0.
Stop handling supervisor child-start errors explicitly.
Add {rabbit_recovery_terms, rabbit_queue_index}:stop/0 variants.
Introduce a `stop? code path from BQ:stop/0 to qi:stop/0.
|
|
|
|
|
| |
Use rabbit_sup:start_child/1, since a transient restart is fine.
Match on rabbit_recovery_terms:recover/0, since we want to crash if that fails.
|
|
|
|
|
|
|
|
|
|
|
| |
- store/2 took a full dir path whereas read/1 only took the basename;
now they both take the basename.
- clearly separate the public API and the internal API in exports
- don't have specs for internal API
- remove unused UPGRADE_TABLE define
- ditch rabbit.hrl include - it was only needed for ?MAX_WAIT
- sensible order of function definitions, plus some separators for
clarity
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of passing amqqueue records to BQ:start/1, revert to passing
queue names and return a list of queue recovery terms ordered
identically to the given queue names. As a result, we can go back to
keying recovery data off the unique queue directory (base)name and no
longer need to track the queue name in the qi. We now also only need
the queue directory name to lookup recovery terms.
Also update the BQ interface documentation and callbacks/specs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We remove knowledge of queue directories from rabbit_amqqueue, opting
to key index recovery terms off the amqqueue record name (which is a
resource record) instead. Although this simplifies the code somewhat
and avoid a potentially costly lookup during queue initialisation, it
does require a change to the backing queue API, since we now wish for
r_amqqueue:recover/0 to iterate over all the queues (paired with their
recovery terms, if any) and this means passing #amqqueue{} records
around instead of using a #resource{} and/or directory name as keys.
Also see rabbit_recovery_terms:read/1, which has gained an extra
parameter, since during upgrades we have no access to #amqqueue{}
records and /must/ therefore key any upgraded recovery data on the
queue directory (basename) instead. This double keyed lookup is
particularly gross since we could look the dirname up ourselves in
rabbit_recovery_terms:read/1, but doing so avoids the need to export
queue_name_to_dir_name from the qi _and_ calculating the MD5 on the
queue?s name twice, since the qi (which is calling into read/2) has
already done that anyway.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- upgrade_recovery_{indexes => terms}
- improved and consistent parameter names
- uniform and properly aligned spec attributes
- better naming convention for queue-dir / key handling
|
| |
|
|
|
|
|
|
|
| |
Ensure the ?queues? directory exists before attempting to sync the
recovery terms dets table. Drive qi recovery off the durable queues
we?re passed, rather than relying on the existence of queue dirs,
which are created lazily.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We process all the recovery terms up-front, during qi recovery, and
clear + sync the dets table immediately afterwards. The recovery terms
and keys, based on the queue directory?s ?basename?, are then passed
throughout the initialisation process and checked in the various
places they?re used.
|
| |
|
|
|