Files
scylladb/core
Nadav Har'El f687ec40a3 fstream: catch bug early
the file_data_sink_impl::put() code assumes it is always called on buffers
with size multiple of dma alignment (4096), except the *last* one. After
writing one unaligned-size buffer, further writes cannot continue because
the offset into the file no longer has the right alignment! If a caller
does try to do that, there is a bug in the caller (it's not a run-time error,
it's a design bug), and better discover it quickly with an assert, as I do
in this patch.

I had such a caller in an example application, and it took me a whole day
of debugging just to figure out that this is where the caller actually had
a bug.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Reviewed-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-06-28 19:31:00 +03:00
..
2015-03-01 15:29:13 +02:00
2015-06-15 08:47:44 +03:00
2015-04-19 10:33:38 +03:00
2015-06-28 19:31:00 +03:00
2015-06-21 20:36:15 +03:00
2015-05-19 19:33:18 +03:00
2015-06-01 11:35:37 +03:00
2015-06-01 11:35:37 +03:00
2015-06-25 17:03:52 +03:00
2015-06-15 16:35:22 +03:00
2015-06-15 16:35:48 +03:00
2015-05-19 19:33:18 +03:00
2015-03-03 14:58:58 +02:00
2015-06-28 15:14:56 +03:00
2015-03-24 10:12:47 +02:00
2015-05-14 11:26:58 +03:00
2015-06-14 23:52:25 +03:00
2015-06-16 17:10:22 +03:00
2015-06-14 16:02:18 +03:00