{"push_id":1011054233,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"b7e29691c25656bf9b3bfe8c6de87216de304476","before":"8575f1391fd1e80d8e19cb8bc27e60dfae6b435a","commits":[{"sha":"b7e29691c25656bf9b3bfe8c6de87216de304476","author":{"email":"625169824b719df98706d88646d0aae6f368ae4d@scylladb.com","name":"Nadav Har'El"},"message":"sstables: avoid index and data file over-reads\n\nWhen we do a streaming read that knows the expected *end* position of the\nread, we can use a large read-ahead buffer, and at the same time, stop\nreading at exactly the intended end (or small rounding of it to the DMA\nblock size) and not waste resources blindly reading a large amount of data\nafter the end just to fill the read-ahead buffer.\n\nThe sstable reading code, both for reading the data file and the index file,\ncreated a file input stream without specifiying its end, thereby losing\nthis optimization - so when a large buffer was used, we would get a large\nover-read. This patch fixes this, so sstable data file and index file are\nread using a file input stream which is a ware of its end.\n\nFixes #964.\n\nNote that this patch does not change the behavior when reading a\n*compressed* data file. For compressed read, we did not have the problem\nof over-read in the first place, because chunks are read one by one.\nBut we do have other sources of inefficiencies there (stemming, again,\nfrom the fact that the compressed chunks are read one by one), and I\nopened a separate issue #992 for that.\n\nSigned-off-by: Nadav Har'El <nyh@scylladb.com>\nMessage-Id: <1457219304-12680-1-git-send-email-nyh@scylladb.com>","distinct":true,"url":"https://api.github.com/repos/scylladb/scylla/commits/b7e29691c25656bf9b3bfe8c6de87216de304476"}]}