mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 09:52:54 +00:00
followup 0a37164c29: also rename IoConcurrency::serial()
This commit is contained in:
@@ -209,7 +209,7 @@ impl Timeline {
|
||||
.get_rel_page_at_lsn_batched(
|
||||
pages.iter().map(|(tag, blknum)| (tag, blknum)),
|
||||
effective_lsn,
|
||||
IoConcurrency::serial(),
|
||||
IoConcurrency::sequential(),
|
||||
ctx,
|
||||
)
|
||||
.await;
|
||||
|
||||
@@ -6651,7 +6651,7 @@ mod tests {
|
||||
.get_vectored_impl(
|
||||
aux_keyspace.clone(),
|
||||
read_lsn,
|
||||
&mut ValuesReconstructState::new(IoConcurrency::serial()),
|
||||
&mut ValuesReconstructState::new(IoConcurrency::sequential()),
|
||||
&ctx,
|
||||
)
|
||||
.await;
|
||||
@@ -6799,7 +6799,7 @@ mod tests {
|
||||
.get_vectored_impl(
|
||||
read.clone(),
|
||||
current_lsn,
|
||||
&mut ValuesReconstructState::new(IoConcurrency::serial()),
|
||||
&mut ValuesReconstructState::new(IoConcurrency::sequential()),
|
||||
&ctx,
|
||||
)
|
||||
.await?;
|
||||
@@ -6934,7 +6934,7 @@ mod tests {
|
||||
ranges: vec![child_gap_at_key..child_gap_at_key.next()],
|
||||
},
|
||||
query_lsn,
|
||||
&mut ValuesReconstructState::new(IoConcurrency::serial()),
|
||||
&mut ValuesReconstructState::new(IoConcurrency::sequential()),
|
||||
&ctx,
|
||||
)
|
||||
.await;
|
||||
@@ -7433,7 +7433,7 @@ mod tests {
|
||||
.get_vectored_impl(
|
||||
keyspace.clone(),
|
||||
lsn,
|
||||
&mut ValuesReconstructState::new(IoConcurrency::serial()),
|
||||
&mut ValuesReconstructState::new(IoConcurrency::sequential()),
|
||||
&ctx,
|
||||
)
|
||||
.await?
|
||||
@@ -7623,7 +7623,7 @@ mod tests {
|
||||
lsn: Lsn,
|
||||
ctx: &RequestContext,
|
||||
) -> anyhow::Result<(BTreeMap<Key, Result<Bytes, PageReconstructError>>, usize)> {
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
let res = tline
|
||||
.get_vectored_impl(keyspace.clone(), lsn, &mut reconstruct_state, ctx)
|
||||
.await?;
|
||||
@@ -7912,7 +7912,7 @@ mod tests {
|
||||
);
|
||||
|
||||
// test vectored scan on parent timeline
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
let res = tline
|
||||
.get_vectored_impl(
|
||||
KeySpace::single(Key::metadata_key_range()),
|
||||
@@ -7938,7 +7938,7 @@ mod tests {
|
||||
);
|
||||
|
||||
// test vectored scan on child timeline
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
let res = child
|
||||
.get_vectored_impl(
|
||||
KeySpace::single(Key::metadata_key_range()),
|
||||
@@ -7976,7 +7976,7 @@ mod tests {
|
||||
lsn: Lsn,
|
||||
ctx: &RequestContext,
|
||||
) -> Result<Option<Bytes>, GetVectoredError> {
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
let mut res = tline
|
||||
.get_vectored_impl(
|
||||
KeySpace::single(key..key.next()),
|
||||
@@ -10068,7 +10068,12 @@ mod tests {
|
||||
|
||||
let keyspace = KeySpace::single(get_key(0)..get_key(10));
|
||||
let results = tline
|
||||
.get_vectored(keyspace, delta_layer_end_lsn, IoConcurrency::serial(), &ctx)
|
||||
.get_vectored(
|
||||
keyspace,
|
||||
delta_layer_end_lsn,
|
||||
IoConcurrency::sequential(),
|
||||
&ctx,
|
||||
)
|
||||
.await
|
||||
.expect("No vectored errors");
|
||||
for (key, res) in results {
|
||||
|
||||
@@ -240,7 +240,7 @@ impl IoConcurrency {
|
||||
/// TODO: over time, work towards removing this method.
|
||||
/// Requires finding a long-lived root for the IoConcurrency and funneling it through
|
||||
/// to the place that does the get_values_reconstruct_data call.
|
||||
pub(crate) fn serial() -> Self {
|
||||
pub(crate) fn sequential() -> Self {
|
||||
Self::spawn(SelectedIoConcurrency::Sequential)
|
||||
}
|
||||
pub(crate) fn spawn_from_conf(
|
||||
|
||||
@@ -92,7 +92,7 @@ async fn smoke_test() {
|
||||
};
|
||||
|
||||
let img_before = {
|
||||
let mut data = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut data = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
layer
|
||||
.get_values_reconstruct_data(
|
||||
controlfile_keyspace.clone(),
|
||||
@@ -127,7 +127,7 @@ async fn smoke_test() {
|
||||
|
||||
// on accesses when the layer is evicted, it will automatically be downloaded.
|
||||
let img_after = {
|
||||
let mut data = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut data = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
layer
|
||||
.get_values_reconstruct_data(
|
||||
controlfile_keyspace.clone(),
|
||||
|
||||
@@ -1009,7 +1009,7 @@ impl Timeline {
|
||||
ranges: vec![key..key.next()],
|
||||
};
|
||||
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
|
||||
let vectored_res = self
|
||||
.get_vectored_impl(keyspace.clone(), lsn, &mut reconstruct_state, ctx)
|
||||
@@ -1143,7 +1143,7 @@ impl Timeline {
|
||||
.get_vectored_impl(
|
||||
keyspace.clone(),
|
||||
lsn,
|
||||
&mut ValuesReconstructState::new(IoConcurrency::serial()),
|
||||
&mut ValuesReconstructState::new(IoConcurrency::sequential()),
|
||||
ctx,
|
||||
)
|
||||
.await;
|
||||
@@ -4182,7 +4182,7 @@ impl Timeline {
|
||||
.get_vectored(
|
||||
key_request_accum.consume_keyspace(),
|
||||
lsn,
|
||||
IoConcurrency::serial(),
|
||||
IoConcurrency::sequential(),
|
||||
ctx,
|
||||
)
|
||||
.await?;
|
||||
@@ -4265,7 +4265,7 @@ impl Timeline {
|
||||
start: Key,
|
||||
) -> Result<ImageLayerCreationOutcome, CreateImageLayersError> {
|
||||
// Metadata keys image layer creation.
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_state = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
let begin = Instant::now();
|
||||
let data = self
|
||||
.get_vectored_impl(partition.clone(), lsn, &mut reconstruct_state, ctx)
|
||||
@@ -5785,7 +5785,7 @@ impl Timeline {
|
||||
for layer in guard.layer_map()?.iter_historic_layers() {
|
||||
if !layer.is_delta() && layer.image_layer_lsn() == lsn {
|
||||
let layer = guard.get_from_desc(&layer);
|
||||
let mut reconstruct_data = ValuesReconstructState::new(IoConcurrency::serial());
|
||||
let mut reconstruct_data = ValuesReconstructState::new(IoConcurrency::sequential());
|
||||
layer
|
||||
.get_values_reconstruct_data(
|
||||
KeySpace::single(Key::MIN..Key::MAX),
|
||||
|
||||
Reference in New Issue
Block a user