Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.apache.doris.regression.util.NodeType
suite('test_schema_change_with_compaction1', 'nonConcurrent') {
def getJobState = { tableName ->
def jobStateResult = sql """ SHOW ALTER TABLE COLUMN WHERE IndexName='${tableName}' ORDER BY createtime DESC LIMIT 1 """
logger.info("jobStateResult: " + jobStateResult)
return jobStateResult[0][9]
}

Expand Down Expand Up @@ -57,6 +58,7 @@ suite('test_schema_change_with_compaction1', 'nonConcurrent') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand Down Expand Up @@ -107,13 +109,15 @@ suite('test_schema_change_with_compaction1', 'nonConcurrent') {
trigger_and_wait_compaction("date", "base")
def newTabletId = array[1].TabletId
logger.info("run compaction:" + newTabletId)
(code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, newTabletId)
def (code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, newTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("invalid tablet state."))


// cu compaction
trigger_and_wait_compaction("date", "cumulative")
} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
if (injectBe != null) {
DebugPoint.disableDebugPoint(injectBe.Host, injectBe.HttpPort.toInteger(), NodeType.BE, injectName)
Expand All @@ -136,7 +140,7 @@ suite('test_schema_change_with_compaction1', 'nonConcurrent') {
assertEquals(count[0][0], 23004);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ suite('test_schema_change_with_compaction10', 'docker') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand Down Expand Up @@ -113,12 +114,14 @@ suite('test_schema_change_with_compaction10', 'docker') {
trigger_and_wait_compaction("date", "base")
def newTabletId = array[1].TabletId
logger.info("run compaction:" + newTabletId)
(code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, newTabletId)
def (code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, newTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("invalid tablet state."))

// cu compaction
trigger_and_wait_compaction("date", "cumulative")
} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
if (injectBe != null) {
GetDebugPoint().disableDebugPointForAllBEs(injectName)
Expand All @@ -141,7 +144,7 @@ suite('test_schema_change_with_compaction10', 'docker') {
assertEquals(count[0][0], 2556);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.apache.doris.regression.util.NodeType
suite('test_schema_change_with_compaction2', 'nonConcurrent') {
def getJobState = { tableName ->
def jobStateResult = sql """ SHOW ALTER TABLE COLUMN WHERE IndexName='${tableName}' ORDER BY createtime DESC LIMIT 1 """
logger.info("jobStateResult: " + jobStateResult)
return jobStateResult[0][9]
}

Expand Down Expand Up @@ -57,6 +58,7 @@ suite('test_schema_change_with_compaction2', 'nonConcurrent') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand All @@ -83,7 +85,7 @@ suite('test_schema_change_with_compaction2', 'nonConcurrent') {
sql "select count(*) from date"
// cu compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
boolean running = true
do {
Expand Down Expand Up @@ -113,7 +115,7 @@ suite('test_schema_change_with_compaction2', 'nonConcurrent') {

// base compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)


Expand All @@ -134,6 +136,8 @@ suite('test_schema_change_with_compaction2', 'nonConcurrent') {
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("invalid tablet state."))

} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
if (injectBe != null) {
DebugPoint.disableDebugPoint(injectBe.Host, injectBe.HttpPort.toInteger(), NodeType.BE, injectName)
Expand All @@ -158,7 +162,7 @@ suite('test_schema_change_with_compaction2', 'nonConcurrent') {
assertEquals(count[0][0], 20448);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.apache.doris.regression.util.NodeType
suite('test_schema_change_with_compaction3', 'nonConcurrent') {
def getJobState = { tableName ->
def jobStateResult = sql """ SHOW ALTER TABLE COLUMN WHERE IndexName='${tableName}' ORDER BY createtime DESC LIMIT 1 """
logger.info("jobStateResult: " + jobStateResult)
return jobStateResult[0][9]
}

Expand Down Expand Up @@ -57,6 +58,7 @@ suite('test_schema_change_with_compaction3', 'nonConcurrent') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand All @@ -83,7 +85,7 @@ suite('test_schema_change_with_compaction3', 'nonConcurrent') {
sql "select count(*) from date"
// cu compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
boolean running = true
do {
Expand Down Expand Up @@ -117,7 +119,7 @@ suite('test_schema_change_with_compaction3', 'nonConcurrent') {

// base compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)


Expand Down Expand Up @@ -160,6 +162,8 @@ suite('test_schema_change_with_compaction3', 'nonConcurrent') {
running = compactionStatus.run_status
} while (running)
}
} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
sql """ CANCEL ALTER TABLE COLUMN FROM date """
if (injectBe != null) {
Expand All @@ -183,7 +187,7 @@ suite('test_schema_change_with_compaction3', 'nonConcurrent') {
assertEquals(count[0][0], 23004);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.apache.doris.regression.util.NodeType
suite('test_schema_change_with_compaction4', 'nonConcurrent') {
def getJobState = { tableName ->
def jobStateResult = sql """ SHOW ALTER TABLE MATERIALIZED VIEW WHERE IndexName='${tableName}' ORDER BY createtime DESC LIMIT 1 """
logger.info("jobStateResult: " + jobStateResult)
return jobStateResult[0][8]
}

Expand Down Expand Up @@ -57,6 +58,7 @@ suite('test_schema_change_with_compaction4', 'nonConcurrent') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand All @@ -83,7 +85,7 @@ suite('test_schema_change_with_compaction4', 'nonConcurrent') {
sql "select count(*) from date"
// cu compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
boolean running = true
do {
Expand Down Expand Up @@ -117,7 +119,7 @@ suite('test_schema_change_with_compaction4', 'nonConcurrent') {

// base compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)


Expand Down Expand Up @@ -160,6 +162,8 @@ suite('test_schema_change_with_compaction4', 'nonConcurrent') {
running = compactionStatus.run_status
} while (running)
}
} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
sql """ CANCEL ALTER TABLE MATERIALIZED VIEW FROM date """
if (injectBe != null) {
Expand All @@ -183,7 +187,7 @@ suite('test_schema_change_with_compaction4', 'nonConcurrent') {
assertEquals(count[0][0], 23004);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ suite('test_schema_change_with_compaction5', 'docker') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand All @@ -86,7 +87,7 @@ suite('test_schema_change_with_compaction5', 'docker') {
sql "select count(*) from date"
// cu compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
boolean running = true
do {
Expand Down Expand Up @@ -118,7 +119,7 @@ suite('test_schema_change_with_compaction5', 'docker') {
}
// base compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_base_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)


Expand Down Expand Up @@ -164,6 +165,8 @@ suite('test_schema_change_with_compaction5', 'docker') {
cluster.restartFrontends()
sleep(30000)
context.reconnectFe()
} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
if (injectBe != null) {
GetDebugPoint().disableDebugPointForAllBEs(injectName)
Expand All @@ -186,7 +189,7 @@ suite('test_schema_change_with_compaction5', 'docker') {
assertEquals(count[0][0], 23004);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ suite('test_schema_change_with_compaction6', 'docker') {
// check load state
while (true) {
def stateResult = sql "show load where Label = '${loadLabel}'"
logger.info("stateResult: " + stateResult)
def loadState = stateResult[stateResult.size() - 1][2].toString()
if ("CANCELLED".equalsIgnoreCase(loadState)) {
throw new IllegalStateException("load ${loadLabel} failed.")
Expand All @@ -86,7 +87,7 @@ suite('test_schema_change_with_compaction6', 'docker') {
sql "select count(*) from date"
// cu compaction
logger.info("run compaction:" + originTabletId)
(code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_run_cumulative_compaction(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + err)
boolean running = true
do {
Expand Down Expand Up @@ -167,6 +168,8 @@ suite('test_schema_change_with_compaction6', 'docker') {
} while (running)
}

} catch (Exception e) {
logger.error("Exception: " + e)
} finally {
if (injectBe != null) {
GetDebugPoint().disableDebugPointForAllBEs(injectName)
Expand All @@ -189,7 +192,7 @@ suite('test_schema_change_with_compaction6', 'docker') {
assertEquals(count[0][0], 23004);
// check rowsets
logger.info("run show:" + originTabletId)
(code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
def (code, out, err) = be_show_tablet_status(injectBe.Host, injectBe.HttpPort, originTabletId)
logger.info("Run show: code=" + code + ", out=" + out + ", err=" + err)
assertTrue(out.contains("[0-1]"))
assertTrue(out.contains("[2-7]"))
Expand Down
Loading