File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -261,8 +261,8 @@ func WithAllowRouterServiceHandleStoreRequest() GetStoreOption {
261261 return func (op * GetStoreOp ) { op .AllowRouterServiceHandle = true }
262262}
263263
264- // WithPDLeaderOnlyStoreRequest means the store request must be handled by PD leader.
265- func WithPDLeaderOnlyStoreRequest () GetStoreOption {
264+ // WithPDLeaderHandleStoreRequestOnly means the store request must be handled by PD leader.
265+ func WithPDLeaderHandleStoreRequestOnly () GetStoreOption {
266266 return func (op * GetStoreOp ) {
267267 op .AllowRouterServiceHandle = false
268268 }
@@ -324,8 +324,8 @@ func WithOutputMustContainAllKeyRange() GetRegionOption {
324324 return func (op * GetRegionOp ) { op .OutputMustContainAllKeyRange = true }
325325}
326326
327- // WithPDLeaderOnly means the request must be handled by PD leader.
328- func WithPDLeaderOnly () GetRegionOption {
327+ // WithAllowPDLeaderOnly means the request must be handled by PD leader.
328+ func WithAllowPDLeaderOnly () GetRegionOption {
329329 return func (op * GetRegionOp ) {
330330 op .AllowRouterServiceHandle = false
331331 op .AllowFollowerHandle = false
Original file line number Diff line number Diff line change @@ -120,15 +120,15 @@ func TestOptions(t *testing.T) {
120120 WithAllowRouterServiceHandle ()(& op )
121121 re .True (op .AllowFollowerHandle )
122122 re .True (op .AllowRouterServiceHandle )
123- WithPDLeaderOnly ()(& op )
123+ WithAllowPDLeaderOnly ()(& op )
124124 re .False (op .AllowFollowerHandle )
125125 re .False (op .AllowRouterServiceHandle )
126126
127127 storeOp := GetStoreOp {}
128128 re .False (storeOp .AllowRouterServiceHandle )
129129 WithAllowRouterServiceHandleStoreRequest ()(& storeOp )
130130 re .True (storeOp .AllowRouterServiceHandle )
131- WithPDLeaderOnlyStoreRequest ()(& storeOp )
131+ WithPDLeaderHandleStoreRequestOnly ()(& storeOp )
132132 re .False (storeOp .AllowRouterServiceHandle )
133133}
134134
You can’t perform that action at this time.
0 commit comments