summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* factor out common termination handlingbug21087Matthias Radestock2009-08-071-18/+12
|
* don't ignore Debug info in pre/post-hibernate hook return handlingMatthias Radestock2009-08-071-6/+6
|
* refactoring of pre/post hibernation codeMatthias Radestock2009-08-071-31/+25
| | | | to make it simpler and shorter
* trimmed some fat from docsMatthias Radestock2009-08-061-12/+8
|
* more documentationMatthew Sackman2009-08-061-26/+32
|
* documentationMatthew Sackman2009-08-061-5/+10
|
* All done.Matthew Sackman2009-08-061-66/+80
|
* Matthias wanted to be able to cope with the possibility that we get woken up ↵Matthew Sackman2009-08-031-9/+15
| | | | without having a msg to receive. We have no idea if this is possible. Nevertheless, in the previous code, it would block waiting for a msg (mirroring OTP behaviour). Now it'll work, but we have to avoid a potential crash elsewher.
* The bug was not as advertised (it actually popped up when merging into ↵Matthew Sackman2009-08-031-5/+10
| | | | 20980). However, we should definitely make sure we receive at least 1 msg when coming out of hibernate, and in loop we don't care too much. Also, use now() to seed the rng as erlang doesn't do it for you (rng state is implicitly per process).
* All done.Matthew Sackman2009-08-032-70/+82
| | | | Introduced drain explicitly because to do otherwise would have made life even harder. Everything addressed as per bug and IM. Test once for functions being exported and cache
* Implemented. Seems to work well. Changed the design and behaviour of the ↵Matthew Sackman2009-07-292-68/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | backoff as discussed with Matthias over IM. Documented in comments, reproduced here: %% 5) init can return a 4th arg, {backoff, InitialTimeout, %% MinimumTimeout, DesiredHibernatePeriod} (all in %% milliseconds). Then, on all callbacks which can return a timeout %% (including init), timeout can be 'hibernate'. When this is the %% case, the current timeout value will be used (initially, the %% InitialTimeout supplied from init). After this timeout has %% occurred, handle_pre_hibernate/1 will be called. If that returns %% {hibernate, State} then the process will be hibernated. Upon %% awaking, a new current timeout value will be calculated, and then %% handle_post_hibernate/1 will be called. The purpose is that the %% gen_server2 takes care of adjusting the current timeout value such %% that the process will increase the timeout value repeatedly if it %% is unable to sleep for the DesiredHibernatePeriod. If it is able to %% sleep for the DesiredHibernatePeriod it will decrease the current %% timeout down to the MinimumTimeout, so that the process is put to %% sleep sooner (and hopefully for longer). In short, should a process %% using this receive a burst of messages, it should not hibernate %% between those messages, but as the messages become less frequent, %% the process will not only hibernate, it will do so sooner after %% each message. %% %% Normal timeout values (i.e. not 'hibernate') can still be used, and %% if they are used then the handle_info(timeout, State) will be %% called as normal. In this case, returning 'hibernate' from %% handle_info(timeout, State) will not hibernate the process %% immediately, as it would if backoff wasn't being used. Instead %% it'll wait for the current timeout as described above, before %% calling handle_pre_hibernate(State).
* cosmeticMatthias Radestock2009-07-241-8/+4
|
* don't include TimeoutState in status formattingMatthias Radestock2009-07-241-10/+3
| | | | | ordinary timeouts are not shown as part of the status, so it doesn't make sense to show the special ones. Also, the code was incorrect.
* remove R13B-1ismMatthias Radestock2009-07-241-4/+0
|
* *idiot*.Matthew Sackman2009-07-091-12/+11
|
* a) reverted the change to do_send which had come in when I updated ↵Matthew Sackman2009-07-061-7/+8
| | | | | | gen_server2 to R13B1 - this was a change originally made by matthias to ensure that messages cast to remote nodes are done so in order b) Add guards and slightly relax name/1 so that it works in R11B5. All tests pass in R11B5 and manual testing of the binary backoff hibernation shows that too works.
* All cosmetic (line length)Matthew Sackman2009-07-061-28/+49
|
* Pushed the binary exponential timeout / hibernate system into gen_server2. ↵Matthew Sackman2009-07-062-92/+117
| | | | Adjusted amqqueue_process to use it. Added documentation. Tested thoroughly with explicit test module (not added), and full test suite, which all passed. Existing tests further up in this bug similarly pass and demonstrate code is functioning correctly.
* updating gen_server2 with latest from R13B01 in order to ensure this doesn't ↵Matthew Sackman2009-07-063-28/+71
| | | | slip badly behind the shipped version.
* Done. In order to keep the code simple, the detection of naptime is done in ↵Matthew Sackman2009-07-021-6/+45
| | | | | | | | | | | | | | | | | | | reply and noreply functions. This means that the now() value there includes computation relating to the last message in. This is maybe not desirable, but the alternative is to wrap all of handle_cast, handle_call and handle_info. Nevertheless, testing shows this works: in the erlang client: Conn = amqp_connection:start("guest", "guest", "localhost"), Chan = lib_amqp:start_channel(Conn), [begin Q = list_to_binary(integer_to_list(R)), Q = lib_amqp:declare_queue(Chan, Q) end || R <- lists:seq(1,1000)], Props = (amqp_util:basic_properties()). [begin Q = list_to_binary(integer_to_list(R)), ok = lib_amqp:publish(Chan, <<"">>, Q, <<0:(8*1024)>>, Props) end || _ <- lists:seq(1,1500), R <- lists:seq(1,1000)]. Then, after that lot's gone in, in a shell do: watch -n 2 "time ./scripts/rabbitmqctl list_queues | tail" The times for me start off at about 2.3 seconds, then drop rapidly to 1.4 and then 0.2 seconds and stay there.
* merge bug21060 into defaultMatthias Radestock2009-07-010-0/+0
|\
* | better exception tagbug21060Matthias Radestock2009-07-011-1/+1
| |
* | fix another off-by-one errorMatthias Radestock2009-07-011-1/+1
| |
* | foldMatthias Radestock2009-07-011-9/+6
| |
* | Fix off-by-one error (discovered by Matthias)Tony Garnock-Jones2009-07-011-1/+1
| |
* | cosmeticMatthias Radestock2009-07-011-23/+19
| |
* | Convenience rabbit_basic functions.Tony Garnock-Jones2009-06-222-11/+59
|/
* Updated portfile for 1.6.0 releaseTim Clark2009-06-181-4/+4
|
* tabs -> spacesMatthias Radestock2009-06-186-25/+25
|
* TMPDIR should be honoured by MakefileMatthew Sackman2009-06-181-2/+6
|
* Added tag rabbitmq_v1_6_0 for changeset 1588df06f913Matthias Radestock2009-06-160-0/+0
|
* add package changelog entries for 1.6.0 releaserabbitmq_v1_6_0Matthias Radestock2009-06-162-0/+9
|
* merge bug20961 into defaultMatthias Radestock2009-06-163-3/+5
|\
| * emergency merge of bug20958 into defaultMatthias Radestock2009-06-166-142/+142
| |\ | | | | | | | | | further qa is still required
| | * merge bug20979 into defaultMatthias Radestock2009-06-162-1/+3
| | |\
| | | * merge bug20976 into defaultMatthias Radestock2009-06-160-0/+0
| | | |\
| | | * | Altered dependencies and added comment to the appbug20976Matthew Sackman2009-06-122-2/+4
| | | |/
| | * | cleandb is now an rm -rf and build depends not on mnesiabug20979Matthew Sackman2009-06-122-2/+2
| | |/
| * | FIx for escaping of argumentsbug20958Tim Clark2009-06-141-11/+1
| | |
* | | Fixing up escaping of commandline argumentsbug20961Tim Clark2009-06-141-11/+1
| | |
* | | Attempt to fix regexp in PortfileTim Clark2009-06-121-4/+4
| | |
* | | Changes to version and checksumsTim Clark2009-06-121-4/+4
| |/ |/|
* | merging in bug20943Matthew Sackman2009-06-111-129/+120
|\ \
| * | refactoring: rename "round robin" to "active consumers"bug20943Matthias Radestock2009-06-101-27/+31
| | |
| * | proper round-robining even when blockingMatthias Radestock2009-06-101-124/+111
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This involved some substantial changes to the queue internal data structures - mostly by choice; the new design is cleaner: - We no longer keep a list of consumers in the channel records. Now the channel records just contain a consumer count instead, and that's only there for efficiency so we can more easily tell when we need to register/unregister with the limiter. - We now keep *two* consumer queues - one of active consumers (that's the one we've always had) and one of blocked consumers. We round-robin on the first one as before, and move things between the two queues when blocking/unblocking channels. When doing so the relative order of a channel's consumers is preserved, so the effects of any round-robining the active consumers get carried through to the blocked consumers when they get blocked and then back to the active consumers when they get unblocked.
* | emergency merge of bug20958 into defaultMatthias Radestock2009-06-103-14/+21
|\ \ | |/ |/| | | | | | | We point to the macports files of the default branch from our web site and they got broken with the merge of bug20333. This hopefully fixes that, but further qa is required.
| * merge in bug20955Matthew Sackman2009-06-101-4/+11
| |\
| | * respect channel blocking when adding consumersbug20955Matthias Radestock2009-06-101-4/+11
| |/
| * Merge bug20801 into defaultHubert Plociniczak2009-06-101-8/+10
| |\
| | * Merge two default branches into one.Hubert Plociniczak2009-06-103-23/+50
| | |\