sstables: index_reader: Avoid schema copy in advance_to()

Introduced in 7e15e43.

Exposed by perf_fast_forward:

  running: large-partition-skips on dataset large-part-ds1
  Testing scanning large partition with skips.
  Reads whole range interleaving reads with skips according to read-skip pattern:
  read    skip      time (s)     frags     frag/s (...)
  1       0         5.268780   8000000    1518378

  1       1        31.695985   4000000     126199
Message-Id: <1544614272-21970-1-git-send-email-tgrabiec@scylladb.com>

(cherry picked from commit 0a853b8866)
This commit is contained in:
Tomasz Grabiec
2018-12-12 12:31:12 +01:00
committed by Avi Kivity
parent e91c741ef5
commit 9dd4e1b01f

View File

@@ -718,7 +718,7 @@ public:
return make_ready_future<>();
}
auto cmp_with_start = [pos_cmp = promoted_index_block_compare(s), s]
auto cmp_with_start = [pos_cmp = promoted_index_block_compare(s), &s]
(position_in_partition_view pos, const promoted_index_block& info) -> bool {
return pos_cmp(pos, info.start(s));
};