tweaked crash_gen tool
This commit is contained in:
parent
519a002511
commit
032d93b59a
|
@ -1192,6 +1192,7 @@ class StateMechine:
|
||||||
# case of multiple creation and drops
|
# case of multiple creation and drops
|
||||||
|
|
||||||
if self._curState.canDropDb():
|
if self._curState.canDropDb():
|
||||||
|
if gSvcMgr == None: # only if we are not restarting service
|
||||||
self._curState.assertIfExistThenSuccess(tasks, TaskDropDb)
|
self._curState.assertIfExistThenSuccess(tasks, TaskDropDb)
|
||||||
# self.assertAtMostOneSuccess(tasks, DropDbTask) # not really in
|
# self.assertAtMostOneSuccess(tasks, DropDbTask) # not really in
|
||||||
# case of drop-create-drop
|
# case of drop-create-drop
|
||||||
|
@ -1366,8 +1367,10 @@ class TaskExecutor():
|
||||||
def __init__(self, size=10):
|
def __init__(self, size=10):
|
||||||
self._size = size
|
self._size = size
|
||||||
self._list = []
|
self._list = []
|
||||||
|
self._lock = threading.Lock()
|
||||||
|
|
||||||
def add(self, n: int):
|
def add(self, n: int):
|
||||||
|
with self._lock:
|
||||||
if not self._list: # empty
|
if not self._list: # empty
|
||||||
self._list.append(n)
|
self._list.append(n)
|
||||||
return
|
return
|
||||||
|
@ -1497,6 +1500,9 @@ class Task():
|
||||||
return True
|
return True
|
||||||
elif msg.find("duplicated column names") != -1: # also alter table tag issues
|
elif msg.find("duplicated column names") != -1: # also alter table tag issues
|
||||||
return True
|
return True
|
||||||
|
elif (gSvcMgr!=None) and gSvcMgr.isRestarting():
|
||||||
|
logger.info("Ignoring error when service is restarting: errno = {}, msg = {}".format(errno, msg))
|
||||||
|
return True
|
||||||
|
|
||||||
return False # Not an acceptable error
|
return False # Not an acceptable error
|
||||||
|
|
||||||
|
@ -2196,7 +2202,7 @@ class SvcManager:
|
||||||
|
|
||||||
self.svcMgrThread = ServiceManagerThread() # create the object
|
self.svcMgrThread = ServiceManagerThread() # create the object
|
||||||
self.svcMgrThread.start()
|
self.svcMgrThread.start()
|
||||||
print("TAOS service started, printing out output...")
|
print("Attempting to start TAOS service started, printing out output...")
|
||||||
self.svcMgrThread.procIpcBatch(
|
self.svcMgrThread.procIpcBatch(
|
||||||
trimToTarget=10,
|
trimToTarget=10,
|
||||||
forceOutput=True) # for printing 10 lines
|
forceOutput=True) # for printing 10 lines
|
||||||
|
@ -2397,6 +2403,9 @@ class ServiceManagerThread:
|
||||||
|
|
||||||
if self._status == MainExec.STATUS_STARTING: # we are starting, let's see if we have started
|
if self._status == MainExec.STATUS_STARTING: # we are starting, let's see if we have started
|
||||||
if line.find(self.TD_READY_MSG) != -1: # found
|
if line.find(self.TD_READY_MSG) != -1: # found
|
||||||
|
logger.info("Waiting for the service to become FULLY READY")
|
||||||
|
time.sleep(1.0) # wait for the server to truly start. TODO: remove this
|
||||||
|
logger.info("Service is now FULLY READY")
|
||||||
self._status = MainExec.STATUS_RUNNING
|
self._status = MainExec.STATUS_RUNNING
|
||||||
|
|
||||||
# Trim the queue if necessary: TODO: try this 1 out of 10 times
|
# Trim the queue if necessary: TODO: try this 1 out of 10 times
|
||||||
|
|
Loading…
Reference in New Issue