We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 89e90c0 commit a3762c4Copy full SHA for a3762c4
1 file changed
lib/resty/cassandra/cluster.lua
@@ -578,7 +578,8 @@ local function check_schema_consensus(coordinator)
578
return local_res[1].schema_version
579
end
580
581
-local function wait_schema_consensus(self, coordinator)
+local function wait_schema_consensus(self, coordinator, timeout)
582
+ timeout = timeout or self.max_schema_consensus_wait
583
local peers, err = get_peers(self)
584
if err then return nil, err
585
elseif not peers then return nil, 'no peers in shm'
@@ -598,7 +599,7 @@ local function wait_schema_consensus(self, coordinator)
598
599
update_time()
600
ok, err = check_schema_consensus(coordinator)
601
tdiff = get_now() - tstart
- until ok or err or tdiff >= self.max_schema_consensus_wait
602
+ until ok or err or tdiff >= timeout
603
604
if ok then
605
return ok
0 commit comments