diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-14 20:12:52 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-08-14 20:12:52 +0100 |
commit | 70005c42e1c5c40df7f75532392d39cd540b12e9 (patch) | |
tree | 0cca9dbec18fb316ee79a2d580426cafff2ca2da /src/file_handle_cache.erl | |
parent | 85a9de64b873e6a9d7df2047fbc0ce3143309485 (diff) | |
download | rabbitmq-server-70005c42e1c5c40df7f75532392d39cd540b12e9.tar.gz |
A msg can appear > once in the same file because of multiple queues receiving the same msg. When we iterate through the msgs we find in the file, we must check that the msg corresponds to the msg in the index, by matching not just with guid but also with offset. Also just for fun, assert the total_size matches. Also, fixed a mistake in file_handle_cache where the dirty flag on the destination of copy wasn't being set.
Diffstat (limited to 'src/file_handle_cache.erl')
-rw-r--r-- | src/file_handle_cache.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file_handle_cache.erl b/src/file_handle_cache.erl index 5b348580..8db5a794 100644 --- a/src/file_handle_cache.erl +++ b/src/file_handle_cache.erl @@ -382,7 +382,8 @@ copy(Src, Dest, Count) -> {ok, Count1} = Result1 -> {Result1, [SHandle #handle { offset = SOffset + Count1 }, - DHandle #handle { offset = DOffset + Count1 }]}; + DHandle #handle { offset = DOffset + Count1, + is_dirty = true }]}; Error -> {Error, [SHandle, DHandle]} end; |