summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Utterly baffled. I thought this was the obvious refactoring I was doing ↵Matthew Sackman2009-11-251-15/+9
| | | | earlier, but apparently not. Anyway, this works.
* Corrected spec for open and inlined the internal versions. Also used the ↵Matthew Sackman2009-11-251-127/+121
| | | | with_flushed_handles for truncate and position. It breaks sync if you do *both* the flushed form and then the obvious refactoring within it (i.e. pull the Handle1 up) and I can't quite see why
* removed calls to rabbit_log, using error_logger instead. Still one call to ↵Matthew Sackman2009-11-251-3/+3
| | | | rabbit_misc:cmd. Not sure quite what to do about that...
* corrected order of cast tuple; improved set_maximum_since_use; corrected bug ↵Matthew Sackman2009-11-251-21/+30
| | | | that led to a /0, due to exhausting fhs just through calls to inc and dec (from sockets - only happens when the limit is very very low)
* Remove the double indirection of fhc_file and fhc_path; make open non-recursiveMatthew Sackman2009-11-251-45/+39
|
* minor refactoringMatthias Radestock2009-11-241-20/+18
|
* cosmeticMatthias Radestock2009-11-241-12/+12
|
* more cosmeticMatthias Radestock2009-11-241-17/+12
|
* more cosmeticMatthias Radestock2009-11-241-43/+41
|
* more cosmeticMatthias Radestock2009-11-241-66/+81
|
* cosmeticMatthias Radestock2009-11-241-14/+15
|
* merge default into bug21673Matthias Radestock2009-11-241-0/+1
|\
| * Spec for rabbit_misc:sort_field_table/1Tony Garnock-Jones2009-11-231-0/+1
| |
* | merging in from defaultMatthew Sackman2009-11-2316-222/+563
|\ \ | |/
| * merging bug 22020 into defaultMatthew Sackman2009-11-2315-220/+561
| |\
| | * Oops -- it's supposed to be a .hrl, not a .erlTony Garnock-Jones2009-11-235-4/+4
| | |
| | * Speculative specs, pending R13B to try them outTony Garnock-Jones2009-11-236-1/+46
| | |
| | * Rename sort_arguments to sort_field_tableTony Garnock-Jones2009-11-233-5/+5
| | |
| | * Comment lists:keysort in delete_queue_bindingsTony Garnock-Jones2009-11-231-0/+7
| | |
| | * Catch list_to_existing_atom error, throw command_invalidTony Garnock-Jones2009-11-231-1/+7
| | |
| | * License headers on new files.Tony Garnock-Jones2009-11-226-1/+156
| | |
| | * Change to publish (= route-and-deliver) model for exchanges.Tony Garnock-Jones2009-11-216-33/+29
| | | | | | | | | | | | | | | | | | This lets exchanges do arbitrary delivery inspection for routing, arbitrary content rewriting or discarding, and arbitrary content and delivery synthesis.
| | * Make exchanges modular behaviours. AddedTony Garnock-Jones2009-11-2112-208/+340
| |/ | | | | | | | | | | | | rabbit_exchange_behaviour. Split fanout, direct, topic and headers into new modules that implement the new behaviour. Added convention that for exchange type X, a module named rabbit_exchange_type_X must exist.
| * Oversupply of EMatthew Sackman2009-11-201-2/+2
| |
* | Did Matthias's requested transformation of the fhc. Saved 50 lines. It's not ↵Matthew Sackman2009-11-191-152/+145
| | | | | | | | quite as neat as I wanted due to passing extra args through (the difficulty is in writing the with_flushed_handles - you can't write the fun in there to have any arity), so it's always a 2-arity function :: ([any()], [handle()]), but hey, it's still quite a lot nicer than it was.
* | Finished the file handle cache. It works as follows:Matthew Sackman2009-11-196-74/+227
| | | | | | | | | | | | | | | | | | 1) Every client keeps a gb_tree of timestamp-when-fd-was-last-used => fd_ref. This is updated for each action. 2) When a client opens a file or closes a file, it sends a suitable msg to the server, including the smallest timestamp-when-fd-was-last-used (i.e. least recently used fd) 3) The server counts how many fds have been used 4) When too many fds have been used, it finds the average age of the least-recently-used-fds and tells all clients to close anything older than that 5) This is likely to have no effect, because the clients may have since used the fds, thus the ages will be wrong. Regardless of whether any fds have been closed at this point, all the clients send back to the server their current smallest timestamp-when-fd-was-last-used 6) 2 seconds later, the server checks to see if the situation has improved, and if not, using the now updated information (thus the average age will be lower) may choose to further ask all clients to kill off fhs. This will repeat, albeit not that fast until enough fds have been closed.
* | started on the server part of fhcMatthew Sackman2009-11-183-14/+92
| |
* | merge in from defaultMatthew Sackman2009-11-188-95/+140
|\ \ | |/
| * merged default headsMatthew Sackman2009-11-183-2/+9
| |\
| * \ Merge bug21929 into defaultTony Garnock-Jones2009-11-163-83/+130
| |\ \
| | * | Support field-arrays in the parser. This involves a similar factoringMichael Bridgen2009-11-113-32/+49
| | | | | | | | | | | | | | | | | | | | | | | | of field-value to the generator (since field-value is used both for field-table and field-array). Also fixed a dumb mistake in the array bit of rabbit_binary_generator.
| | * | CosmeticMichael Bridgen2009-11-101-11/+11
| | | |
| | * | Refactoring of encoding code, so that it uses the table encoding erm,Michael Bridgen2009-11-102-56/+86
| | | | | | | | | | | | | | | | code. Test case which mostly exercises the table encoding code.
| * | | merge bug21975 into defaultMatthias Radestock2009-11-165-12/+10
| |\ \ \
| | * | | all doneMatthew Sackman2009-11-165-12/+10
| |/ / /
* | | | correction of documentation in absence of prefetcherMatthew Sackman2009-11-181-5/+4
| | | |
* | | | Lots of tidying. Also, don't allow rates to decay infinitely. Instead avg ↵Matthew Sackman2009-11-182-28/+25
| | | | | | | | | | | | | | | | over the last two periods, and assume zero rates when we hibernate.
* | | | Documentation improvementsMatthew Sackman2009-11-181-34/+3
| | | |
* | | | Minor bugfixMatthew Sackman2009-11-181-1/+2
| | | |
* | | | and now remove the accidental commit of the server script. it's late...Matthew Sackman2009-11-181-1/+1
| | | |
* | | | yeah, duration shouldn't be truncated. revertedMatthew Sackman2009-11-182-2/+2
| | | |
* | | | truncate desired duration as I've now seen rounding issues cause behavioural ↵Matthew Sackman2009-11-171-1/+1
| | | | | | | | | | | | | | | | problems
* | | | some cosmetics to MM. Also, there's a problem where if all queues have been ↵Matthew Sackman2009-11-171-10/+14
| | | | | | | | | | | | | | | | pushed out to disk (duration == 0), and then more memory becomes available (eg queue death), then no queues will be brought back in. Therefore, if >= 5% of our memory is available, ensure that the sum is at least 1. This allows queues to come back in.
* | | | Tidying of msg_store as per QA discussion with MatthiasMatthew Sackman2009-11-171-55/+53
| | | |
* | | | Well tracking down that transposed error took about an hour... sigh.Matthew Sackman2009-11-171-1/+1
| | | |
* | | | 1. A bugfix in MM, in internal_update. 2. In MM only enforce limits if we're ↵Matthew Sackman2009-11-172-18/+13
| | | | | | | | | | | | | | | | using more than half the available RAM. 3. In VQ, sum the ingress and egress rates - this makes things much smoother when queues go from being flooded to being consumed, and vice versa.
* | | | If a queue reports 0 duration, then the MM may well calculate that the ↵Matthew Sackman2009-11-171-3/+8
| | | | | | | | | | | | | | | | desired avg duration should be 0. The queue will then be told this on its next report. This is potentially disasterous because for a fast moving queue, setting the duration to 0 will force allmsgs via the disk, which will destroy performance. However, it is not sufficient to just tell all queues reporting 0, infinity, because doing so would result in queues which have been pushed out to disk, suddenly coming all the way back in. Thus if a queue reports a duration of < 1, and the last value we told it was infinity, then we tell it infinity again. Thus fast moving queues are not restricted, and queues which have been told real numbers, and slowly squeezed out to disk stay squeezed out.
* | | | In the absense of an egress rate, use ingress rate instead. Also, if there's ↵Matthew Sackman2009-11-174-41/+77
| | | | | | | | | | | | | | | | been no fetches/publishes since the last measurement, use the previous measurement, appropriately scaled. This means that the rates will gently fall off and approach zero in the absence of activity, which is preferable to them suddenly jumping to zero. Also, the average is now the sum of the fetches/publishes in the last two segments, over the time since the start of the last segment (i.e. it's better than before, which was just a straight /2, which would be wrong if the segments are different sizes, which they could be, given a very busy queue).
* | | | Remove most of the vq tests which are now invalid given the prefetcher has gone.Matthew Sackman2009-11-172-284/+9
| | | |
* | | | stripped out the prefetcher. Note that I've not fixed up the tests yet, so ↵Matthew Sackman2009-11-165-443/+35
| | | | | | | | | | | | | | | | they won't pass