@@ -21,19 +21,19 @@ set-store
2121 store-id=1 node-id=1 attrs=purple locality-tiers=region=us-west-1,zone=us-west-1a
2222 store-id=2 node-id=2 attrs=yellow locality-tiers=region=us-east-1,zone=us-east-1a
2323----
24- node-id=1 failure-summary=ok locality-tiers=region=us-west-1,zone=us-west-1a,node=1
25- store-id=1 membership=full attrs=purple locality-code=1:2:3:
26- node-id=2 failure-summary=ok locality-tiers=region=us-east-1,zone=us-east-1a,node=2
27- store-id=2 membership=full attrs=yellow locality-code=4:5:6:
24+ node-id=1 locality-tiers=region=us-west-1,zone=us-west-1a,node=1
25+ store-id=1 attrs=purple locality-code=1:2:3:
26+ node-id=2 locality-tiers=region=us-east-1,zone=us-east-1a,node=2
27+ store-id=2 attrs=yellow locality-code=4:5:6:
2828
2929store-load-msg
3030 store-id=1 node-id=1 load=[80,80,80] capacity=[100,100,100] secondary-load=0 load-time=0s
3131----
3232
3333get-load-info
3434----
35- store-id=1 node-id=1 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:80, write-bandwidth:80, byte-size:80] node-reported-cpu=80 node-adjusted-cpu=80 seq=1
36- store-id=2 node-id=2 reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=0 node-adjusted-cpu=0 seq=0
35+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:80, write-bandwidth:80, byte-size:80] node-reported-cpu=80 node-adjusted-cpu=80 seq=1
36+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=0 node-adjusted-cpu=0 seq=0
3737
3838store-leaseholder-msg
3939store-id=1
@@ -49,9 +49,9 @@ range-id=1 local-store=1 load=[cpu:80, write-bandwidth:80, byte-size:80] raft-cp
4949
5050get-load-info
5151----
52- store-id=1 node-id=1 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:80, write-bandwidth:80, byte-size:80] node-reported-cpu=80 node-adjusted-cpu=80 seq=1
52+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:80, write-bandwidth:80, byte-size:80] node-reported-cpu=80 node-adjusted-cpu=80 seq=1
5353 top-k-ranges (local-store-id=1) dim=CPURate: r1
54- store-id=2 node-id=2 reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=0 node-adjusted-cpu=0 seq=0
54+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=0 node-adjusted-cpu=0 seq=0
5555
5656make-pending-changes range-id=1
5757 rebalance-replica: remove-store-id=1 add-store-id=2
@@ -71,9 +71,9 @@ range-id=1 local-store=1 load=[cpu:80, write-bandwidth:80, byte-size:80] raft-cp
7171
7272get-load-info
7373----
74- store-id=1 node-id=1 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=80 node-adjusted-cpu=0 seq=2
74+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=80 node-adjusted-cpu=0 seq=2
7575 top-k-ranges (local-store-id=1) dim=CPURate: r1
76- store-id=2 node-id=2 reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:88, write-bandwidth:88, byte-size:88] node-reported-cpu=0 node-adjusted-cpu=88 seq=1
76+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:88, write-bandwidth:88, byte-size:88] node-reported-cpu=0 node-adjusted-cpu=88 seq=1
7777
7878# Same store load from s1. Results in no change.
7979store-load-msg
@@ -82,9 +82,9 @@ store-load-msg
8282
8383get-load-info
8484----
85- store-id=1 node-id=1 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=80 node-adjusted-cpu=0 seq=4
85+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=80 node-adjusted-cpu=0 seq=4
8686 top-k-ranges (local-store-id=1) dim=CPURate: r1
87- store-id=2 node-id=2 reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:88, write-bandwidth:88, byte-size:88] node-reported-cpu=0 node-adjusted-cpu=88 seq=1
87+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:88, write-bandwidth:88, byte-size:88] node-reported-cpu=0 node-adjusted-cpu=88 seq=1
8888
8989# Store leaseholder msg from s1 showing that s2 has a replica but not the lease.
9090store-leaseholder-msg
@@ -105,6 +105,7 @@ change-id=2 store-id=1 node-id=1 range-id=1 load-delta=[cpu:-80, write-bandwidth
105105 prev=(replica-id=1 type=VOTER_FULL leaseholder=true)
106106 next=(replica-id=none type=VOTER_FULL)
107107
108+ # Advance just to simulate some passage of time.
108109tick seconds=5
109110----
110111t=5s
@@ -131,8 +132,8 @@ ranges
131132# The enacted changes are still adjusting the load.
132133get-load-info
133134----
134- store-id=1 node-id=1 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=80 node-adjusted-cpu=0 seq=4
135- store-id=2 node-id=2 reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:88, write-bandwidth:88, byte-size:88] node-reported-cpu=0 node-adjusted-cpu=88 seq=1
135+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:0, write-bandwidth:0, byte-size:0] node-reported-cpu=80 node-adjusted-cpu=0 seq=4
136+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:0, write-bandwidth:0, byte-size:0] adjusted=[cpu:88, write-bandwidth:88, byte-size:88] node-reported-cpu=0 node-adjusted-cpu=88 seq=1
136137
137138# Store load msg from s2 showing updated load.
138139store-load-msg
@@ -141,16 +142,18 @@ store-load-msg
141142
142143# Store load msg from s1 showing updated load.
143144store-load-msg
144- store-id=1 node-id=2 load=[5,5,5] capacity=[100,100,100] secondary-load=1 load-time=14s
145+ store-id=1 node-id=1 load=[5,5,5] capacity=[100,100,100] secondary-load=1 load-time=14s
145146----
146147
147- # Neither load is recent enough (computePendingChangesReflectedInLatestLoad
148- # timeout) to be considered as accounting for the enacted changes. So s2
149- # adjusted load appears very high and s1 adjusted load becomes negative.
148+ # Both of the load msgs had load-time=14s, while the enacted time was 5s.
149+ # Neither is recent enough, since lagForChangeReflectedInLoad is 10s (see
150+ # computePendingChangesReflectedInLatestLoad) to be considered as accounting
151+ # for the enacted changes. So s2 adjusted load appears very high and s1
152+ # adjusted load becomes negative.
150153get-load-info
151154----
152- store-id=1 node-id=1 reported=[cpu:5, write-bandwidth:5, byte-size:5] adjusted=[cpu:-75, write-bandwidth:-75, byte-size:-75] node-reported-cpu=80 node-adjusted-cpu=-80 seq=6
153- store-id=2 node-id=2 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:168, write-bandwidth:168, byte-size:168] node-reported-cpu=5 node-adjusted-cpu=173 seq=3
155+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:5, write-bandwidth:5, byte-size:5] adjusted=[cpu:-75, write-bandwidth:-75, byte-size:-75] node-reported-cpu=5 node-adjusted-cpu=-75 seq=6
156+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:168, write-bandwidth:168, byte-size:168] node-reported-cpu=80 node-adjusted-cpu=168 seq=3
154157
155158# The enacted changes are still adjusting the load.
156159get-pending-changes
@@ -170,15 +173,17 @@ store-load-msg
170173
171174# Store load msg from s1 showing updated load.
172175store-load-msg
173- store-id=1 node-id=2 load=[5,5,5] capacity=[100,100,100] secondary-load=1 load-time=16s
176+ store-id=1 node-id=1 load=[5,5,5] capacity=[100,100,100] secondary-load=1 load-time=16s
174177----
175178
176- # The enacted changes are no longer adjusting the load.
179+ # Both of the load msgs had load-time=16s, while the enacted time was 5s. So
180+ # they are recent enough to be considered as accounting for the enacted
181+ # changes. The enacted changes are no longer adjusting the load.
177182get-pending-changes
178183----
179184pending(0)
180185
181186get-load-info
182187----
183- store-id=1 node-id=1 reported=[cpu:5, write-bandwidth:5, byte-size:5] adjusted=[cpu:5, write-bandwidth:5, byte-size:5] node-reported-cpu=80 node-adjusted-cpu=-80 seq=7
184- store-id=2 node-id=2 reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:80, write-bandwidth:80, byte-size:80] node-reported-cpu=5 node-adjusted-cpu=165 seq=4
188+ store-id=1 node-id=1 status=ok accepting all reported=[cpu:5, write-bandwidth:5, byte-size:5] adjusted=[cpu:5, write-bandwidth:5, byte-size:5] node-reported-cpu=5 node-adjusted-cpu=5 seq=7
189+ store-id=2 node-id=2 status=ok accepting all reported=[cpu:80, write-bandwidth:80, byte-size:80] adjusted=[cpu:80, write-bandwidth:80, byte-size:80] node-reported-cpu=80 node-adjusted-cpu=80 seq=4
0 commit comments