[ARVADOS] updated: 1.3.0-2751-ge66b9230f
Git user
git at public.arvados.org
Mon Jul 6 19:54:17 UTC 2020
Summary of changes:
tools/keep-exercise/keep-exercise.go | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
via e66b9230ffb00603765db8b45a685e9999026933 (commit)
from b272e9772244a684fe3356d92cdf8109392d1b09 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit e66b9230ffb00603765db8b45a685e9999026933
Author: Ward Vandewege <ward at curii.com>
Date: Mon Jul 6 15:53:35 2020 -0400
16585: add warmup phase to ensure there are always sufficient blocks
available for all read threads.
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>
diff --git a/tools/keep-exercise/keep-exercise.go b/tools/keep-exercise/keep-exercise.go
index 0dd94c5f3..05903f0f4 100644
--- a/tools/keep-exercise/keep-exercise.go
+++ b/tools/keep-exercise/keep-exercise.go
@@ -111,7 +111,10 @@ func runExperiment(kc *keepclient.KeepClient, stderr *log.Logger) {
wg.Add(1)
stopCh := make(chan struct{})
- go countBeans(&wg, nextLocator, stopCh, stderr)
+ // Start warmup phase, where we write *ReadThreads blocks
+ if *ReadThreads > 0 {
+ stderr.Printf("Start warmup phase, waiting for %d available blocks before reading starts\n", *ReadThreads)
+ }
for i := 0; i < *WriteThreads; i++ {
nextBuf := make(chan []byte, 1)
wg.Add(1)
@@ -119,6 +122,15 @@ func runExperiment(kc *keepclient.KeepClient, stderr *log.Logger) {
wg.Add(1)
go doWrites(&wg, kc, nextBuf, nextLocator, stopCh, stderr)
}
+ if *ReadThreads > 0 {
+ for len(nextLocator) < *ReadThreads {
+ select {
+ case _ = <-bytesOutChan:
+ }
+ }
+ stderr.Printf("Warmup complete")
+ }
+ go countBeans(&wg, nextLocator, stopCh, stderr)
for i := 0; i < *ReadThreads; i++ {
wg.Add(1)
go doReads(&wg, kc, nextLocator, stopCh, stderr)
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list