summaryrefslogtreecommitdiff
path: root/src/file_handle_cache.erl
Commit message (Collapse)AuthorAgeFilesLines
* Avoid crashbug23153Matthew Sackman2010-08-221-2/+2
|
* ensure and assert that closed handles have last_used_at=undefinedMatthias Radestock2010-08-221-7/+12
| | | | | That way it is more obvious which handles should be in the age tree and which shouldn't.
* cosmeticMatthias Radestock2010-08-221-3/+3
|
* make it more obvious that reopen is a with_age_tree in disguiseMatthias Radestock2010-08-221-9/+10
| | | | plus some minor cosmetic shuffling
* don't traverse age tree unnnecessarily on error in reopenMatthias Radestock2010-08-221-14/+12
| | | | this also makes it clearer what's going on
* cosmeticMatthew Sackman2010-08-221-3/+2
|
* refactor: move open1 into reopenMatthias Radestock2010-08-221-22/+18
|
* If we've obtained permission to open some fds and that turns out not to work ↵Matthew Sackman2010-08-221-1/+4
| | | | out, then we should ensure that we inform the server as soon as we stop that the rest remain closed
* record for pending itemsMatthias Radestock2010-08-221-17/+29
|
* Use foldr instead of foldl to avoid having to do extra reversesMatthew Sackman2010-08-221-11/+9
|
* always return refs/handles in correct orderMatthias Radestock2010-08-221-31/+30
| | | | to improve clarity at the expense of a few list:reverses.
* cosmeticMatthias Radestock2010-08-221-7/+7
|
* always leave at least two fds unobtainableMatthias Radestock2010-08-221-2/+5
| | | | | so that 'copy' can succeed Also, zero-clamp obtain limit
* refactor: make new_closed_handle create the Ref and return itMatthias Radestock2010-08-221-19/+18
|
* merge bug23166 into bug23153Matthias Radestock2010-08-221-11/+28
|\
| * add support for dynamic setting/getting of fhc limitbug23166Matthias Radestock2010-08-221-11/+28
| | | | | | | | and use that in tests
* | Rejigged client side so that it asks for the correct number of fds upfront.Matthew Sackman2010-08-221-60/+94
| |
* | Modify server logic to deal with requests for multiple fds. Including nice ↵Matthew Sackman2010-08-211-31/+76
| | | | | | | | pending_queues abstraction. Client logic remains to be done.
* | Add infrastructure to server to be able to handle requests for multiple fdsMatthew Sackman2010-08-201-13/+16
|/
* oopsbug23139Matthias Radestock2010-08-201-4/+4
|
* merge headsMatthias Radestock2010-08-201-11/+11
|\
| * ensure_mref => track_client andalso cosmeticMatthew Sackman2010-08-201-11/+11
| |
* | simplification due to the fact that we always request closing of allMatthias Radestock2010-08-201-7/+5
| |
* | cosmeticMatthias Radestock2010-08-201-8/+8
|/
* Convert fhc to use an ets table with record per client which amalgamates ↵Matthew Sackman2010-08-201-145/+135
| | | | several of the previous state entries
* Given the clients are demanded to close all open fds when asked to, them ↵Matthew Sackman2010-08-201-10/+9
| | | | sending a boolean is irrelvant now
* If we sent an age of 0 to clients, make sure we do not send more ages of 0 ↵Matthew Sackman2010-08-201-39/+58
| | | | | | to the same clients until they've actually closed all their handles. This ensures that as more requests come in once we're low on fds, we don't send hundreds of 0 ages to the same clients erroneously. It also means that we always target the correct number of *unique* clients to ask to close their fds, which avoids thrashing the same clients and improves performance markedly. Also, if on open, we send "close" back to the client, that client *is* blocked (actually, due to have 0 opens) as we know it'll close, send us some closed msgs and then re do the open call. Thus we shouldn't be sending it any set maximum age messages.
* refactorMatthias Radestock2010-08-191-16/+23
|
* cosmeticMatthias Radestock2010-08-191-11/+11
|
* Some essential assertionsMatthew Sackman2010-08-191-5/+5
|
* More meaningful variable nameMatthew Sackman2010-08-191-2/+2
|
* WhoopsMatthew Sackman2010-08-191-1/+1
|
* Reworked substantiallyMatthew Sackman2010-08-191-88/+117
|
* Merging default into bug 23139 (substantial debitrot)Matthew Sackman2010-08-191-33/+41
|\
| * The solution is very simple: In the case where the fhc sends out requests to ↵Matthew Sackman2010-08-171-1/+3
| | | | | | | | close file handles, the clients might respond very quickly. The fhc will then gather these responses (say, just updates, not closes) and then will sit there for 2 seconds until the timer goes off. Thus the solution is just to subtract the timer period from the calculated average: i.e. the expression is to say 'close file handles that haven't been used for N seconds from NOW' rather than the previous 'close file handles that haven't been used for N seconds from NOW - 2 seconds ago'. This works very nicely and whilst the fhc can get quite busy when there are more users of file handles than there are file handles available, that is hardly surprising, and the fact is starvation is prevented and processes are promptly serviced
| * Track blocked pids explicitlyMatthew Sackman2010-08-171-27/+42
| |
* | Merging bug 23138 into defaultMatthew Sackman2010-08-191-84/+121
|\ \
| * | once again allow use of fhc w/o registeringbug23138Matthias Radestock2010-08-191-4/+7
| | |
| * | rewriteMatthias Radestock2010-08-191-101/+91
| |/
| * Correct monitoring and actions upon DOWN messages. Note this is especially ↵Matthew Sackman2010-08-171-65/+105
|/ | | | subtle for obtains, which effectively implicitly allocates temporarily to the blocked caller (FromPid) whilst monitoring it, and then transfers this to the ForPid when possible. Note the ForPid can die before the obtains is processed, which which point the FromPid must be replied to immediately.
* obtain_and_release_on_death => obtain, and minor refactor of tcp acceptorbug23135Matthew Sackman2010-08-171-13/+11
|
* Combine obtains and release_on_deathMatthew Sackman2010-08-171-27/+30
|
* Minor correctionsbug23132Matthew Sackman2010-08-171-4/+5
|
* cosmeticMatthias Radestock2010-08-161-1/+1
|
* tweakMatthias Radestock2010-08-161-2/+2
|
* tweakMatthias Radestock2010-08-161-5/+5
|
* tweakMatthias Radestock2010-08-161-1/+1
|
* obtain_limit can be 'infinity'Matthias Radestock2010-08-161-1/+1
|
* cosmeticMatthias Radestock2010-08-161-1/+1
|
* refactor: incorporate limit checking into maybe_reduceMatthias Radestock2010-08-161-26/+22
|