diff options
| author | Matthew Sackman <matthew@lshift.net> | 2009-11-06 14:18:51 +0000 |
|---|---|---|
| committer | Matthew Sackman <matthew@lshift.net> | 2009-11-06 14:18:51 +0000 |
| commit | 4c8dcae91ec74a85783b0793d0bbc8af39134174 (patch) | |
| tree | b7958bbd5b90c5491f57a68d53da466bcb0b7d5e /Makefile | |
| parent | 7a636944bcd9c951af1c3ce32f63a6d132106728 (diff) | |
| download | rabbitmq-server-git-4c8dcae91ec74a85783b0793d0bbc8af39134174.tar.gz | |
man 2 write states:
POSIX requires that a read(2) which can be proved to occur after a write() has returned returns the new data.
This means that in the msg_store, when we're reading a msg, we only need to make sure that write has really been called on the msg. We do not need to sync here. So, add a test, explicitly to hit this condition.
We were using both buffering in the fhc, and also delayed_write. This is dangerous, because we can think that we've written out from the fhc, but even though we're writing > the 64 kbyte default limit in delayed_write, we may not be writing a whole number of 64kb blocks, thus there may be something left in the delayed_write buffer, so remove that. Performance doesn't suffer because we're writing blocks of 1MB anyway!
Also, the current_offset/1 fun in fhc was returning the virtual address - i.e. where we would be if we flushed out the write buffer. We actually need both variants - getting the real raw offset of the handle, and getting the virtual offset.
Finally, as a result of all of this, the sync fun in msg_store now has no need to do any work unless there are outstanding transactions.
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions
