Skip to content

Commit 280c264

Browse files
muirdmmeta-codesync[bot]
authored andcommitted
revisionstore: remove unbounded scmstore queue fallback
Summary: Remove the experimental unbounded scmstore result queue escape hatch now that bounded queues have been running without issues. FileStore and TreeStore fetches always use their bounded result channels. Reviewed By: zzl0 Differential Revision: D105911075 fbshipit-source-id: 3a7e78dcdbf2e829ba60e8688b31a1905851f394
1 parent fa84cd7 commit 280c264

4 files changed

Lines changed: 6 additions & 38 deletions

File tree

eden/scm/lib/revisionstore/src/scmstore/builder.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -359,10 +359,6 @@ impl<'a> FileStoreBuilder<'a> {
359359

360360
progress_bar: AggregatingProgressBar::new("fetching from ScmStore", "files"),
361361

362-
unbounded_queue: self
363-
.config
364-
.get_or_default("experimental", "unbounded-scmstore-queue")?,
365-
366362
lfs_buffer_in_memory: self
367363
.config
368364
.get_or_default("experimental", "lfs-buffer-in-memory")?,
@@ -713,9 +709,6 @@ impl<'a> TreeStoreBuilder<'a> {
713709
flush_on_drop: true,
714710
format,
715711
progress_bar: AggregatingProgressBar::new("fetching from ScmStore", "trees"),
716-
unbounded_queue: self
717-
.config
718-
.get_or_default("experimental", "unbounded-scmstore-queue")?,
719712
verify_hash,
720713
restricted_tree_mode,
721714
acl_check_cache: new_acl_check_cache(),

eden/scm/lib/revisionstore/src/scmstore/file.rs

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ use anyhow::bail;
2525
use anyhow::ensure;
2626
use blob::Blob;
2727
use flume::bounded;
28-
use flume::unbounded;
2928
use metrics::FILE_STORE_FETCH_METRICS;
3029
use minibytes::Bytes;
3130
use parking_lot::Mutex;
@@ -106,9 +105,6 @@ pub struct FileStore {
106105
// threads (so that only a single progress bar shows up to the user).
107106
pub(crate) progress_bar: Arc<AggregatingProgressBar>,
108107

109-
// Temporary escape hatch to disable bounding of queue.
110-
pub(crate) unbounded_queue: bool,
111-
112108
// Temporary escape hatch to disable streaming of LFS data to caches.
113109
pub(crate) lfs_buffer_in_memory: bool,
114110

@@ -195,14 +191,9 @@ impl FileStore {
195191

196192
let bar = self.progress_bar.create_or_extend_local(0);
197193

198-
let (found_tx, found_rx) = if self.unbounded_queue {
199-
// Escape hatch in case something goes wrong with bounding.
200-
unbounded()
201-
} else {
202-
// Bound channel size so we don't use unlimited memory queueing up file content
203-
// when the consumer is consuming slower than we are fetching.
204-
bounded(RESULT_QUEUE_SIZE)
205-
};
194+
// Bound channel size so we don't use unlimited memory queueing up file content
195+
// when the consumer is consuming slower than we are fetching.
196+
let (found_tx, found_rx) = bounded(RESULT_QUEUE_SIZE);
206197

207198
let indexedlog_cache = self.indexedlog_cache.clone();
208199

@@ -555,8 +546,6 @@ impl FileStore {
555546

556547
progress_bar: AggregatingProgressBar::new("", ""),
557548

558-
unbounded_queue: false,
559-
560549
lfs_buffer_in_memory: false,
561550

562551
max_fetch_count: Default::default(),
@@ -606,8 +595,6 @@ impl FileStore {
606595

607596
progress_bar: self.progress_bar.clone(),
608597

609-
unbounded_queue: self.unbounded_queue,
610-
611598
lfs_buffer_in_memory: self.lfs_buffer_in_memory,
612599

613600
max_fetch_count: self.max_fetch_count.clone(),

eden/scm/lib/revisionstore/src/scmstore/tree.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ use edenapi_types::FileAuxData;
3535
use edenapi_types::TreeAuxData;
3636
use fetch::FetchState;
3737
use flume::bounded;
38-
use flume::unbounded;
3938
use metrics::TREE_STORE_FETCH_METRICS;
4039
use minibytes::Bytes;
4140
use moka::sync::Cache;
@@ -182,9 +181,6 @@ pub struct TreeStore {
182181
// threads (so that only a single progress bar shows up to the user).
183182
pub(crate) progress_bar: Arc<AggregatingProgressBar>,
184183

185-
// Temporary escape hatch to disable bounding of queue.
186-
pub(crate) unbounded_queue: bool,
187-
188184
pub(crate) verify_hash: bool,
189185

190186
pub restricted_tree_mode: RestrictedTreeMode,
@@ -365,14 +361,9 @@ impl TreeStore {
365361

366362
let bar = self.progress_bar.create_or_extend_local(0);
367363

368-
let (found_tx, found_rx) = if self.unbounded_queue {
369-
// Escape hatch in case something goes wrong with bounding.
370-
unbounded()
371-
} else {
372-
// Bound channel size so we don't use unlimited memory queueing up file content
373-
// when the consumer is consuming slower than we are fetching.
374-
bounded(RESULT_QUEUE_SIZE)
375-
};
364+
// Bound channel size so we don't use unlimited memory queueing up file content
365+
// when the consumer is consuming slower than we are fetching.
366+
let (found_tx, found_rx) = bounded(RESULT_QUEUE_SIZE);
376367

377368
let indexedlog_cache = self.indexedlog_cache.clone();
378369
let aux_cache = self.filestore.as_ref().and_then(|fs| fs.aux_cache.clone());
@@ -679,7 +670,6 @@ impl TreeStore {
679670
prefetch_tree_parents: false,
680671
format: SerializationFormat::Hg,
681672
progress_bar: AggregatingProgressBar::new("", ""),
682-
unbounded_queue: false,
683673
verify_hash: true,
684674
restricted_tree_mode: RestrictedTreeMode::Disabled,
685675
acl_check_cache: new_acl_check_cache(),
@@ -761,7 +751,6 @@ impl TreeStore {
761751
prefetch_tree_parents: false,
762752
format: self.format(),
763753
progress_bar: self.progress_bar.clone(),
764-
unbounded_queue: self.unbounded_queue,
765754
verify_hash: self.verify_hash,
766755
restricted_tree_mode: self.restricted_tree_mode,
767756
acl_check_cache: self.acl_check_cache.clone(),

eden/scm/lib/revisionstore/src/trait_impls.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,6 @@ mod tests {
387387
flush_on_drop: false,
388388
format: SerializationFormat::Hg,
389389
progress_bar: progress_model::AggregatingProgressBar::new("", ""),
390-
unbounded_queue: false,
391390
lfs_buffer_in_memory: false,
392391
max_fetch_count: Default::default(),
393392
})

0 commit comments

Comments
 (0)