summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* All the below, done.Matthew Sackman2009-08-242-78/+79
| | | | | | | | | | | | | - encoded body size is being cached, but doesn't need to be. - extract_sequence_numbers and remove_gaps_in_sequences should just take #dqstate.sequences, not the whole #dqstate. - rename length/1 to len/1 - that's what it's called in other APIs, e.g. queue. It will also allow you to remove the erlang: prefix from the calls to erlang:length. - load_messages/3 - instead of taking and returning a state, make it take the file_summary only, and return {current_file_num, current_file_name, current_offset}. (not done due to Good Reasons, but the 1st base case that was objected to has vanished)
* More cosmetics. Also, if the seek failed, it's probably safer to assume that ↵Matthew Sackman2009-08-241-5/+5
| | | | we've not changed position. However, it's really expected life will stop pretty soon after anyway, so it's probably not too important.
* cosmeticMatthew Sackman2009-08-241-1/+1
|
* Abstracted out all the read handles stuff to a separate module, and refined ↵Matthew Sackman2009-08-242-84/+147
| | | | the API as discussed.
* preemptive refactoring and other assorted changesMatthew Sackman2009-08-232-65/+54
|
* renamingMatthew Sackman2009-08-231-3/+4
|
* Sorted out transactions within the disk_queue, ensuring that if they do ↵Matthew Sackman2009-08-231-71/+95
| | | | restart that other data structures cannot be left partially updated, and can continue successfully, in particular, manipulation of ets tables within mnesia transactions.
* Could repeatably read zeros.Matthew Sackman2009-08-221-4/+3
| | | | | | | | | | With the handle position caching in, avoiding seeks opened a lovely opportunity for reading zeros. The read handle had read_ahead turned on, so even though the write handle was being sync'd correctly, the next read was reading cached data. Consequently, reading zeros instead of the real message. This makes a valuable point which is that with read_ahead turned on, the seeks on every read, as was happening previously, were evicting the read_ahead cache, even if the seek was in effect a noop. Thus read_ahead, in combination with the seeks, made no performance gain. Consequently, turning read_ahead off and only seeking when necessary is a performance gain, over (pointlessly) having read_ahead on and seeking every time. Turning read_ahead off also solves this reading zeros bug. Finally, corrected some maths so that we now check to see if the sync offset is < the offset we will reach rather than <= the offset we read from. Because the offsets should only ever be on message boundaries, both will work, but the new version is more intuitively correct.
* merging in from bug 21444 with the vain hope that 21444 does not need ↵Matthew Sackman2009-08-211-10/+11
|\ | | | | | | further work!
| * And another go. If the new node is a ram node then local_content tables are ↵Matthew Sackman2009-08-211-10/+11
| | | | | | | | still honoured as to their own table storage type
* | mode => storage_mode in most placesMatthew Sackman2009-08-215-29/+27
| | | | | | | | Also removed chattiness of mixed_queue on queue mode transitions
* | merging from bug 21429Matthew Sackman2009-08-211-4/+12
|\ \ | |/
| * oops. Need to support ram nodes which still have local content as disc_copiesMatthew Sackman2009-08-211-4/+12
| |
* | merging from 21429Matthew Sackman2009-08-211-18/+6
|\ \ | |/
| * Refactoring as suggested. This has been tested by for local_content by ↵Matthew Sackman2009-08-211-18/+6
| | | | | | | | patching 21368 and ensuring clustering still works
* | merging in from 21429Matthew Sackman2009-08-211-21/+16
|\ \ | |/
| * tiny refactoringMatthew Sackman2009-08-211-10/+8
| |
| * some cleaning upMatthias Radestock2009-08-201-11/+8
| | | | | | | | mainly remove the (now) badly named WasDiskNode var
* | cosmetic -> with_queue_head => queue_headMatthew Sackman2009-08-211-23/+33
| | | | | | | | | | | | Also, time for a new optimisation! YAY! Previously, reading a message off disk meant seeking to the correct position and then reading the data. Now if the handle is already in the right position, then that seek is a waste of quite a lot of time, as it is an OS call. Now, I cache the location of the handle and so avoid seeking when possible. This has a MASSIVE effect on performance, especially in straight line cases, eg where a single prefetcher can drain a queue of disk in about one third of the time it used to take. Just looking at the code coverage from the test suite, there were just 534 seeks and 8582 cases where we found the handle in the right position already. This is a fairly small amount of code, and provides very useful benefits.
* | Refactoring out code used in multiple paths through internal_fetch and ↵Matthew Sackman2009-08-214-128/+144
| | | | | | | | internal_read_message, tidying of API.
* | Merge default into bug21368Tony Garnock-Jones2009-08-218-157/+20
|\ \
| * \ Merged bug19973 into defaultPaul Jones2009-08-214-141/+20
| |\ \
| | * | Hg overestimated its ability to handle a mergeDavid Wragg2009-08-201-2/+1
| | | |
| | * | Merge default into bug19973, resolving conflictDavid Wragg2009-08-2030-93/+477
| | |\ \ | | |/ / | |/| |
| * | | Merge fixes from bug20342 into defaultDavid Wragg2009-08-204-16/+0
| |\ \ \
| | * | | Removed the default setup of ERLANG_HOMEPaul Jones2009-08-204-16/+0
| | | | |
| | | * | Restore the LOCK_FILE support, as demanded by rpmlintDavid Wragg2009-08-143-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On Debian, we set the value of LOCK_FILE to the empty string, thus disabling use of a lock file. Now tested with rpmlint and lintian.
| | | * | Use a common init script for RPMs and debsDavid Wragg2009-08-134-132/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Put the common init file into packaging/common, and modify the RPM and deb builds to make the one substitution required to this file at build time.
| | | * | Change RETVAL when showing usage message to 1David Wragg2009-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the Fedora skeleton init script uses 2, it doesn't seem to be universal across their init scripts, and the specs aren't clear on what the value should be. So follow the Debian init script in this case.
| | | * | Reconcile actions peformed by the init scriptsDavid Wragg2009-08-132-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Not all the actions behave according to specs, but this is a general issue with our init scripts.
| | | * | Remove the LOCK_FILE bits from the RPM init.dDavid Wragg2009-08-131-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RPM init.d has some lock file support, but its not really functional (we never actually check whether it is present). So rip it out for now. We should put proper lock/pid file support back later.
| | | * | Omit runlevel list in the LSB Default-{Start,Stop} commentDavid Wragg2009-08-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Neither our Fedora/RH or Debian packages actually depend on the value in this comment - the list of runlevels to install the service into comes from somewhere else in both cases. But Fedora guidelines say that "Only services which are really required for a vital system should define runlevels here". So don't.
| | | * | Reconcile LSB "Provides" facility name as rabbitmq-serverDavid Wragg2009-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | rabbitmq-server seems a more precise statement of the facility than rabbitmq.
| | | * | Add chkconfig preamble to debian init.dDavid Wragg2009-08-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | chkconfig is a Redhat thing, so this has no practical impact for Debian. Some other Debian packages also have init.d scripts with a chkconfig section, so hopefully the Debian gods will not take offence.
* | | | | tidying of memory estimationMatthew Sackman2009-08-201-7/+5
| | | | |
* | | | | remove ForceInCache at it's not been used since before the current prefetcher.Matthew Sackman2009-08-201-13/+7
| | | | |
* | | | | typo in docs in previous commit.Matthew Sackman2009-08-204-37/+29
| | | | | | | | | | | | | | | | | | | | Also changed internal_fetch so its result construction, which whilst not wrong, was at least confusing, and had unexecutable code in it. Associated changes elsewhere.
* | | | | Made messages be marked as delivered during prefetch *before* they are ↵Matthew Sackman2009-08-202-43/+43
| | | | | | | | | | | | | | | | | | | | passed to the prefetcher.
* | | | | remove the unnecessary sync from tx_cancel. A cancel cannot be ↵Matthew Sackman2009-08-201-2/+1
| | | | | | | | | | | | | | | | | | | | misinterleaved with a commit for the same transaction so it's not necessary.
* | | | | Well, this was a very very sneaky bug.Matthew Sackman2009-08-202-36/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) create durable queue 2) send persistent msgs and send queue to disk_only mode (note, requires branch bug21444) 3) when done, set queue to mixed mode 4) send more persistent msgs 5) when done, wait for the prefetcher to do its thing 6) restart rabbit 7) observe that queue length is wrong Bugs fixed: o) in the to_disk_only_mode code in mixed_queue, msgs that had come out of the prefetcher weren't being acked. This meant that on a restart, the msgs would be recovered. Given that we have to requeue everything anyway (sometimes) in a mixed -> disk transition, we obviously have to ack these msgs before republishing them. Note that we do this as part of a tx_commit, so it's perfectly safe o) in the to_disk_only_mode code in mixed_queue, there was a recursion which swapped an IsDurable param with an IsDelivered param. This caused substantial fail. o) transaction commit coalescing is dangerous, especially when you're relying on calls to the disk queue to happen in order. For example, should you tx_publish, tx_commit and then auto_ack, or requeue_next_n, you would expect that those last calls get to see the msgs tx_published. This is not necessarily the case. A further good example is a tx_commit followed by a queue.delete. So, in the disk_queue for such calls, make sure that we flush properly, but also expose this functionality (it was already exposed, but as a cast, and although not absolutely necessary to be a call, if we're tx_commiting anyway then that's a call, so another full round trip isn't a problem). One final note, there is no way that this bug would have been discovered and so easily replicated and debugged without the pinning code in bug 21444. We will seriously hamper our own ability to debug and aid clients should the new persister get released without 21444.
* | | | | > You should just *replace* to_{mixed,disk_only_mode}_mode with set_mode, ↵Matthew Sackman2009-08-201-37/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not make the latter a wrapper for the former. Done.
* | | | | merging in from defaultMatthew Sackman2009-08-204-33/+65
|\ \ \ \ \ | |/ / / /
| * | | | merge bug21426 into defaultMatthias Radestock2009-08-201-2/+2
| |\ \ \ \
| * | | | | eliminate unused var warningMatthias Radestock2009-08-201-1/+1
| | | | | |
| * | | | | merge bug21427 into defaultMatthias Radestock2009-08-201-7/+19
| |\ \ \ \ \
| | * | | | | it's a serial, not a guidMatthias Radestock2009-08-201-3/+3
| | | | | | |
| | * | | | | don't ignore errorsMatthias Radestock2009-08-201-4/+6
| | | | | | |
| | * | | | | use new term file helpersMatthias Radestock2009-08-201-15/+5
| | | | | | |
| | * | | | | merge default into bug21427Matthias Radestock2009-08-204-26/+156
| | |\ \ \ \ \ | | |/ / / / / | |/| | | | |
| * | | | | | use new term file helpersMatthias Radestock2009-08-201-19/+7
| | | | | | |