Skip to content

Commit

Permalink
支持searcher启动时不加载target,由fed加载 (#365)
Browse files Browse the repository at this point in the history
fix: #364
  • Loading branch information
weizijun authored Dec 14, 2023
1 parent 291d4f2 commit d588f80
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def addOptions(self):
self.parser.add_option('', '--enablePublishTableTopoInfo', action='store_true', dest='enablePublishTableTopoInfo', default=False)
self.parser.add_option('', '--force_tablet_load', action='store_true', dest='forceTabletLoad', default=False)
self.parser.add_option('', '--qrsLoadTarget', action='store_true', dest='qrsLoadTarget', default=False)
self.parser.add_option('', '--searcherLoadTarget', action='store_true', dest='searcherLoadTarget', default=False)

def parseParams(self, optionList):
self.optionList = optionList
Expand Down Expand Up @@ -247,6 +248,8 @@ def initMember(self, options):
else:
self.offlineConfigPath = os.path.join(self.offlineConfigPath, str(tableVersions[-1]))

self.qrsLoadTarget = options.qrsLoadTarget
self.searcherLoadTarget = options.searcherLoadTarget
self.httpBindPort = options.httpBindPort
self.arpcBindPort = options.arpcBindPort
self.grpcBindPort = options.grpcBindPort
Expand Down Expand Up @@ -387,7 +390,7 @@ def start_once(self):
if len(zoneNames) > 1:
return -1, ("", "local access mode only support one zone, now zone names " + str(zoneNames), -1)

if not self.enableLocalAccess:
if not self.enableLocalAccess and self.searcherLoadTarget:
ret = self.loadSearcherTarget(searcherTargetInfos, terminator.left_time())
if ret != 0:
return ret, ("", "load searcher target failed", -1)
Expand Down

0 comments on commit d588f80

Please sign in to comment.