projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
61c3f86
)
Added comments about zero-replica blocks in underReplicated.
author
mishaz <misha@curoverse.com>
Tue, 16 Jun 2015 18:34:00 +0000
(18:34 +0000)
committer
mishaz <misha@curoverse.com>
Tue, 16 Jun 2015 18:34:00 +0000
(18:34 +0000)
services/datamanager/summary/pull_list.go
patch
|
blob
|
history
diff --git
a/services/datamanager/summary/pull_list.go
b/services/datamanager/summary/pull_list.go
index 950d1d056b762e937a36d5d4c66c51f5f40a362c..d2eef9316ba8ab91794bb0f84822a9cac1ac7b7b 100644
(file)
--- a/
services/datamanager/summary/pull_list.go
+++ b/
services/datamanager/summary/pull_list.go
@@
-59,6
+59,10
@@
type PullServers struct {
// Creates a map from block locator to PullServers with one entry for
// each under-replicated block.
// Creates a map from block locator to PullServers with one entry for
// each under-replicated block.
+//
+// This method ignores zero-replica blocks since there are no servers
+// to pull them from, so callers should feel free to omit them, but
+// this function will ignore them if they are provided.
func ComputePullServers(kc *keepclient.KeepClient,
keepServerInfo *keep.ReadServers,
blockToDesiredReplication map[blockdigest.DigestWithSize]int,
func ComputePullServers(kc *keepclient.KeepClient,
keepServerInfo *keep.ReadServers,
blockToDesiredReplication map[blockdigest.DigestWithSize]int,
@@
-81,10
+85,9
@@
func ComputePullServers(kc *keepclient.KeepClient,
if numCopiesMissing > 0 {
// We expect this to always be true, since the block was listed
// in underReplicated.
if numCopiesMissing > 0 {
// We expect this to always be true, since the block was listed
// in underReplicated.
- // TODO(misha): Consider asserting the above conditional.
if numCopies > 0 {
if numCopies > 0 {
- //
I believe that we should expect this to always be true
.
+ //
Not much we can do with blocks with no copies
.
// A server's host-port string appears as a key in this map
// iff it contains the block.
// A server's host-port string appears as a key in this map
// iff it contains the block.