projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
14745: Replaces debug println with proper return and doc clean up
[arvados.git]
/
services
/
keep-balance
/
block_state.go
diff --git
a/services/keep-balance/block_state.go
b/services/keep-balance/block_state.go
index 22e89c019ab9fa5a5fb833bf84bbc63df7a4e93b..46e69059c9c796c5b23318f8f9b78b4f3c83651e 100644
(file)
--- a/
services/keep-balance/block_state.go
+++ b/
services/keep-balance/block_state.go
@@
-23,6
+23,7
@@
type Replica struct {
// replicas actually stored (according to the keepstore indexes we
// know about).
type BlockState struct {
// replicas actually stored (according to the keepstore indexes we
// know about).
type BlockState struct {
+ RefCount int
Replicas []Replica
Desired map[string]int
// TODO: Support combinations of classes ("private + durable")
Replicas []Replica
Desired map[string]int
// TODO: Support combinations of classes ("private + durable")
@@
-42,6
+43,7
@@
func (bs *BlockState) addReplica(r Replica) {
}
func (bs *BlockState) increaseDesired(classes []string, n int) {
}
func (bs *BlockState) increaseDesired(classes []string, n int) {
+ bs.RefCount++
if len(classes) == 0 {
classes = defaultClasses
}
if len(classes) == 0 {
classes = defaultClasses
}