summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Made the disk queue start up in the same mode it was last running in.Matthew Sackman2009-09-022-20/+45
| | | | | | This is slightly grim because I have to store some values in the mnesia table which then have to survive all the start up logic, so there are a couple of annoying 1-line changes elsewhere. However, it does indeed work. There was also one bool() -> boolean() fix in the memory_manager.
* factor out sublist and disjoint testsMatthew Sackman2009-09-021-8/+10
|
* Shutdown III: Inline VaporisationMatthew Sackman2009-09-021-7/+3
|
* another attempt at stop/terminate/vaporisation/shutdown/suicide/deathsquadMatthew Sackman2009-09-021-17/+16
|
* renaming of variables.Matthew Sackman2009-09-021-21/+21
|
* A couple of cosmetics - grab_msg_id went away, but tidied up terminate and ↵Matthew Sackman2009-09-021-32/+38
| | | | vaporise - hopefully sufficiently that both Matthias and I are happy with the result\000
* made dq:delete_queue a call, not a cast. This eliminates a race condition ↵Matthew Sackman2009-09-021-4/+5
| | | | between queues being deleted and new queues with the same name being created and published to
* Fixed the mistake Matthias spotted in recovery from crash (comment #211). ↵Matthew Sackman2009-09-021-22/+34
| | | | Tested by deliberately breaking the compaction in a variety of ways and then coverage and startup and ensuring the correct code paths are taken.
* made type signatures almost as useful as commentsMatthew Sackman2009-09-023-11/+19
|
* refactoring of (no)reply1 to eliminate duplicationMatthew Sackman2009-09-011-25/+23
|
* specs for msg_fileMatthew Sackman2009-09-011-0/+16
|
* specs for rabbit_file_handle_cacheMatthew Sackman2009-09-011-0/+21
|
* The multiplier for the memory thresholds should not be on the number of ↵Matthew Sackman2009-09-011-3/+4
| | | | available tokes. In extremis, when available tokens is 0, this makes queues very likely to switch mode (bad, memory is tight), and when there are lots of tokens available, this makes queues less likely to switch mode (bad, memory is plentiful). Instead, we should be using constant offsets, based on the total number of tokens in the system.
* comments on magic 2.5 scaling of memory report, and removal of unnecessary ↵Matthew Sackman2009-09-011-6/+4
| | | | initial calls to report_memory
* Before the magic_marker_msg was introduced, if the queue was entirely on ↵Matthew Sackman2009-09-011-13/+89
| | | | | | disk already and was then told to go to disk_only mode, it would form a single requeue_next_n call, where the N would be the length of the queue. This would be detected by the disk_queue and become a no-op. Because of the introduction of the magic_marker_msg, that is no longer possible - we want the marker to go from the back of the queue to the front. As such, the N will at most be 1 less than the queue length, causing unnecessary work to be done. This patch removes unnecessary work by observing that we do not need to rotate the entire queue should we find that the queue consists of zero or more disk-stored msgs followed by zero or more ram-only stored messages. If this is the case, we only need to publish the latter ram-only messages, and have no need for the magic marker msgs at all. Furthermore, if there are no ram-only messages we have no work to do at all. The only situation in which we must rotate the entire queue is when we have ram-only messages followed by disk messages. In this case, we have to get the ram-only messages onto the disk queue before the disk messages, which requires the full rotation.
* Read through all of Matthias changes, no problems. In here, one cosmetic, ↵Matthew Sackman2009-09-012-9/+5
| | | | and one change so that rmf:read returns the MsgId off disk to be later matched. This is purely defensive.
* refactoring: move all the low level message file i/o into a separate moduleMatthias Radestock2009-08-292-116/+153
| | | | The details of how messages are encoded in files are opaque to disk_queue.
* remove unused constantMatthias Radestock2009-08-291-1/+0
| | | | This was added in revision b48919ed4e12 for no apparent reason
* banish ?FILE_PACKING_ADJUSTMENT from all but three functionsMatthias Radestock2009-08-291-33/+29
| | | | | | | | The details of the message packing are opaque to high level code, as they should be. The TotalSize that code sees now is the total size of the message on disk, including all packing adjustments, which is all that is ever needed to perform all the necessary file positioning etc at that level.
* cosmeticMatthias Radestock2009-08-291-2/+2
|
* cosmetic - mostly whitespace shufflingMatthias Radestock2009-08-291-32/+30
|
* refactoring: rename non-sensical read_file_hc_cache to read_file_handle_cacheMatthias Radestock2009-08-291-9/+9
|
* refactoring: (re)introduce {ok, ...} return on open_fileMatthias Radestock2009-08-291-15/+15
| | | | | | This allows us to replace the last remaining file:open with open_file. Also, extract binary mode settings and use them in both open_file and fh cache creation.
* cosmetic: remove whitespaceMatthias Radestock2009-08-291-21/+18
|
* Other is KOMatthias Radestock2009-08-291-1/+1
| | | | accidentally changed in previous commit
* refactoring: extract reading of stop byteMatthias Radestock2009-08-291-14/+17
|
* cosmeticMatthias Radestock2009-08-291-3/+2
|
* cosmeticMatthias Radestock2009-08-291-5/+3
|
* refactoring: simplify match in read_next_file_entryMatthias Radestock2009-08-291-4/+4
| | | | this is equivalent since the read entities are unsigned
* refactoring: eliminate code duplication in read_message_from_diskMatthias Radestock2009-08-291-8/+7
|
* refactoring: extract file opening, and simplify file:position callsMatthias Radestock2009-08-291-25/+20
|
* refactor: pull msg_location_dets filename construction into separate funMatthias Radestock2009-08-281-6/+7
|
* cosmetic changes to shutdown marker codeMatthias Radestock2009-08-281-94/+95
| | | | | move it to the right place reorganise constants section
* Use an mnesia transaction to record safely shutting down, and associated ↵Matthew Sackman2009-08-281-0/+74
| | | | wiring on startup. Manually verified this all works.
* sigh, mergeMatthew Sackman2009-08-281-0/+8
|\
| * cosmetic - visual separation of sectionsMatthias Radestock2009-08-281-0/+8
| |
* | minor refactoringsMatthew Sackman2009-08-281-2/+1
|/
* dq: revert the table change to earlier on, so that recovery isn't as ↵Matthew Sackman2009-08-282-11/+19
| | | | horrendously slow. amqq_proc: correct order of actions in delete_queue and document.
* more mergingMatthew Sackman2009-08-281-5/+6
|\
| * merge headsMatthias Radestock2009-08-281-1/+1
| |\
| * | minor refactoringMatthias Radestock2009-08-281-5/+6
| | | | | | | | | | | | make it more obvious that ReqRem will always end up being <= 0
* | | superdooper. Recovery from crashes mid compaction tested, corrected, working.Matthew Sackman2009-08-282-18/+18
| |/ |/|
* | cosmeticMatthew Sackman2009-08-281-1/+1
|/
* merge heads - gratuitous shufflingMatthew Sackman2009-08-281-93/+117
|\
| * cosmetic: move things aroundMatthias Radestock2009-08-281-93/+117
| |
* | cosmetics - documentationMatthew Sackman2009-08-281-5/+8
|/
* cosmetics - formattingMatthew Sackman2009-08-281-14/+13
|
* merging headsMatthew Sackman2009-08-281-1/+1
|\
| * reference bug21489Matthias Radestock2009-08-281-1/+1
| |
* | Changes to memory_manager. Watch for change in overall amount of free ↵Matthew Sackman2009-08-281-38/+44
|/ | | | tokens, not requested amount