[Enhancement] Improve fe tablet schedules system table (#62073)

Signed-off-by: wyb <wybb86@gmail.com>
This commit is contained in:
wyb 2025-08-19 23:22:38 +08:00 committed by GitHub
parent c301a76c4b
commit c1e1b1fdb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 225 additions and 62 deletions

View File

@ -22,20 +22,31 @@
namespace starrocks {
SchemaScanner::ColumnDesc SchemaFeTabletSchedulesScanner::_s_columns[] = {
{"TABLET_ID", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"TABLE_ID", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"PARTITION_ID", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"TABLET_ID", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"TYPE", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"PRIORITY", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"STATE", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"TABLET_STATUS", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"SCHEDULE_REASON", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"MEDIUM", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"PRIORITY", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"ORIG_PRIORITY", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"LAST_PRIORITY_ADJUST_TIME", TypeDescriptor::from_logical_type(TYPE_DATETIME), sizeof(DateTimeValue), true},
{"VISIBLE_VERSION", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"COMMITTED_VERSION", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"SRC_BE_ID", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"SRC_PATH", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"DEST_BE_ID", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"DEST_PATH", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
{"TIMEOUT", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"CREATE_TIME", TypeDescriptor::from_logical_type(TYPE_DATETIME), sizeof(DateTimeValue), true},
{"SCHEDULE_TIME", TypeDescriptor::from_logical_type(TYPE_DATETIME), sizeof(DateTimeValue), true},
{"FINISH_TIME", TypeDescriptor::from_logical_type(TYPE_DATETIME), sizeof(DateTimeValue), true},
{"CLONE_SRC", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"CLONE_DEST", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"CLONE_BYTES", TypeDescriptor::from_logical_type(TYPE_BIGINT), sizeof(int64_t), false},
{"CLONE_DURATION", TypeDescriptor::from_logical_type(TYPE_DOUBLE), sizeof(double), false},
{"CLONE_RATE", TypeDescriptor::from_logical_type(TYPE_DOUBLE), sizeof(double), false},
{"FAILED_SCHEDULE_COUNT", TypeDescriptor::from_logical_type(TYPE_INT), sizeof(int32_t), false},
{"FAILED_RUNNING_COUNT", TypeDescriptor::from_logical_type(TYPE_INT), sizeof(int32_t), false},
{"MSG", TypeDescriptor::create_varchar_type(sizeof(Slice)), sizeof(Slice), false},
};
@ -89,21 +100,21 @@ Status SchemaFeTabletSchedulesScanner::fill_chunk(ChunkPtr* chunk) {
for (; _cur_idx < end; _cur_idx++) {
auto& info = _infos[_cur_idx];
for (const auto& [slot_id, index] : slot_id_to_index_map) {
if (slot_id < 1 || slot_id > 15) {
if (slot_id < 1 || slot_id > 26) {
return Status::InternalError(strings::Substitute("invalid slot id:$0", slot_id));
}
ColumnPtr column = (*chunk)->get_column_by_slot_id(slot_id);
switch (slot_id) {
case 1: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.table_id);
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.tablet_id);
break;
}
case 2: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.partition_id);
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.table_id);
break;
}
case 3: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.tablet_id);
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.partition_id);
break;
}
case 4: {
@ -112,21 +123,71 @@ Status SchemaFeTabletSchedulesScanner::fill_chunk(ChunkPtr* chunk) {
break;
}
case 5: {
Slice v = Slice(info.priority);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 6: {
Slice v = Slice(info.state);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 6: {
Slice v = Slice(info.schedule_reason);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 7: {
Slice v = Slice(info.tablet_status);
Slice v = Slice(info.medium);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 8: {
Slice v = Slice(info.priority);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 9: {
Slice v = Slice(info.orig_priority);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 10: {
if (info.last_priority_adjust_time > 0) {
DateTimeValue v;
v.from_unixtime(info.last_priority_adjust_time, _runtime_state->timezone_obj());
fill_column_with_slot<TYPE_DATETIME>(column.get(), (void*)&v);
} else {
down_cast<NullableColumn*>(column.get())->append_nulls(1);
}
break;
}
case 11: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.visible_version);
break;
}
case 12: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.committed_version);
break;
}
case 13: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.src_be_id);
break;
}
case 14: {
Slice v = Slice(info.src_path);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 15: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.dest_be_id);
break;
}
case 16: {
Slice v = Slice(info.dest_path);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;
}
case 17: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.timeout);
break;
}
case 18: {
if (info.create_time > 0) {
DateTimeValue v;
v.from_unixtime(static_cast<int64_t>(info.create_time), _runtime_state->timezone_obj());
@ -136,7 +197,7 @@ Status SchemaFeTabletSchedulesScanner::fill_chunk(ChunkPtr* chunk) {
}
break;
}
case 9: {
case 19: {
if (info.schedule_time > 0) {
DateTimeValue v;
v.from_unixtime(static_cast<int64_t>(info.schedule_time), _runtime_state->timezone_obj());
@ -146,7 +207,7 @@ Status SchemaFeTabletSchedulesScanner::fill_chunk(ChunkPtr* chunk) {
}
break;
}
case 10: {
case 20: {
if (info.finish_time > 0) {
DateTimeValue v;
v.from_unixtime(static_cast<int64_t>(info.finish_time), _runtime_state->timezone_obj());
@ -156,23 +217,27 @@ Status SchemaFeTabletSchedulesScanner::fill_chunk(ChunkPtr* chunk) {
}
break;
}
case 11: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.clone_src);
break;
}
case 12: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.clone_dest);
break;
}
case 13: {
case 21: {
fill_column_with_slot<TYPE_BIGINT>(column.get(), (void*)&info.clone_bytes);
break;
}
case 14: {
case 22: {
fill_column_with_slot<TYPE_DOUBLE>(column.get(), (void*)&info.clone_duration);
break;
}
case 15: {
case 23: {
fill_column_with_slot<TYPE_DOUBLE>(column.get(), (void*)&info.clone_rate);
break;
}
case 24: {
fill_column_with_slot<TYPE_INT>(column.get(), (void*)&info.failed_schedule_count);
break;
}
case 25: {
fill_column_with_slot<TYPE_INT>(column.get(), (void*)&info.failed_running_count);
break;
}
case 26: {
Slice v = Slice(info.error_msg);
fill_column_with_slot<TYPE_VARCHAR>(column.get(), (void*)&v);
break;

View File

@ -47,37 +47,59 @@ TEST_F(SchemaFeTabletSchedulesScannerTest, test_normal) {
std::vector<TTabletSchedule> infos;
// normal
auto& s1 = infos.emplace_back();
s1.__set_tablet_id(10);
s1.__set_table_id(1);
s1.__set_partition_id(2);
s1.__set_tablet_id(10);
s1.__set_type("REPAIR");
s1.__set_priority("HIGH");
s1.__set_state("FINISHED");
s1.__set_tablet_status("DISK_MIGRATION");
s1.__set_schedule_reason("DISK_MIGRATION");
s1.__set_medium("HDD");
s1.__set_priority("HIGH");
s1.__set_orig_priority("NORMAL");
s1.__set_last_priority_adjust_time(1749711001);
s1.__set_visible_version(100);
s1.__set_committed_version(100);
s1.__set_src_be_id(10001);
s1.__set_src_path("123456789");
s1.__set_dest_be_id(10002);
s1.__set_dest_path("123456780");
s1.__set_timeout(1000);
s1.__set_create_time(1749711000);
s1.__set_schedule_time(1749711001);
s1.__set_finish_time(1749711002);
s1.__set_clone_src(10001);
s1.__set_clone_dest(10002);
s1.__set_clone_bytes(1);
s1.__set_clone_duration(1);
s1.__set_clone_rate(1);
s1.__set_failed_schedule_count(1);
s1.__set_failed_running_count(0);
s1.__set_error_msg("success");
// xxx_time is null
auto& s2 = infos.emplace_back();
s2.__set_tablet_id(11);
s2.__set_table_id(1);
s2.__set_partition_id(2);
s2.__set_tablet_id(11);
s2.__set_type("BALANCE");
s2.__set_priority("NORMAL");
s2.__set_state("PENDING");
s2.__set_tablet_status("DISK_MIGRATION");
s2.__set_schedule_reason("DISK_MIGRATION");
s2.__set_medium("SSD");
s2.__set_priority("NORMAL");
s2.__set_orig_priority("NORMAL");
s2.__set_last_priority_adjust_time(0);
s2.__set_visible_version(100);
s2.__set_committed_version(100);
s2.__set_src_be_id(10001);
s2.__set_src_path("123456789");
s2.__set_dest_be_id(10002);
s2.__set_dest_path("123456780");
s2.__set_timeout(1000);
s2.__set_create_time(0);
s2.__set_schedule_time(0);
s2.__set_finish_time(-0.001);
s2.__set_clone_src(10001);
s2.__set_clone_dest(10002);
s2.__set_clone_bytes(0);
s2.__set_clone_duration(0);
s2.__set_clone_rate(0);
s2.__set_failed_schedule_count(0);
s2.__set_failed_running_count(0);
s2.__set_error_msg("");
// init and start scanner
@ -92,16 +114,19 @@ TEST_F(SchemaFeTabletSchedulesScannerTest, test_normal) {
EXPECT_FALSE(eos);
EXPECT_EQ(1, chunk->num_rows());
EXPECT_EQ(
"[1, 2, 10, 'REPAIR', 'HIGH', 'FINISHED', 'DISK_MIGRATION', 2025-06-12 14:50:00, 2025-06-12 14:50:01, "
"2025-06-12 14:50:02, 10001, 10002, 1, 1, 'success']",
"[10, 1, 2, 'REPAIR', 'FINISHED', 'DISK_MIGRATION', 'HDD', 'HIGH', 'NORMAL', 2025-06-12 14:50:01, 100, "
"100, 10001, '123456789', 10002, '123456780', 1000, 2025-06-12 14:50:00, 2025-06-12 14:50:01, "
"2025-06-12 14:50:02, 1, 1, 1, 1, 0, 'success']",
chunk->debug_row(0));
chunk->reset();
EXPECT_OK(scanner.get_next(&chunk, &eos));
EXPECT_FALSE(eos);
EXPECT_EQ(1, chunk->num_rows());
EXPECT_EQ("[1, 2, 11, 'BALANCE', 'NORMAL', 'PENDING', 'DISK_MIGRATION', NULL, NULL, NULL, 10001, 10002, 0, 0, '']",
chunk->debug_row(0));
EXPECT_EQ(
"[11, 1, 2, 'BALANCE', 'PENDING', 'DISK_MIGRATION', 'SSD', 'NORMAL', 'NORMAL', NULL, 100, 100, 10001, "
"'123456789', 10002, '123456780', 1000, NULL, NULL, NULL, 0, 0, 0, 0, 0, '']",
chunk->debug_row(0));
chunk->reset();
EXPECT_OK(scanner.get_next(&chunk, &eos));

View File

@ -31,20 +31,31 @@ public class FeTabletSchedulesSystemTable {
NAME,
Table.TableType.SCHEMA,
builder()
.column("TABLET_ID", ScalarType.createType(PrimitiveType.BIGINT))
.column("TABLE_ID", ScalarType.createType(PrimitiveType.BIGINT))
.column("PARTITION_ID", ScalarType.createType(PrimitiveType.BIGINT))
.column("TABLET_ID", ScalarType.createType(PrimitiveType.BIGINT))
.column("TYPE", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("PRIORITY", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("STATE", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("TABLET_STATUS", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("SCHEDULE_REASON", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("MEDIUM", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("PRIORITY", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("ORIG_PRIORITY", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("LAST_PRIORITY_ADJUST_TIME", ScalarType.createType(PrimitiveType.DATETIME))
.column("VISIBLE_VERSION", ScalarType.createType(PrimitiveType.BIGINT))
.column("COMMITTED_VERSION", ScalarType.createType(PrimitiveType.BIGINT))
.column("SRC_BE_ID", ScalarType.createType(PrimitiveType.BIGINT))
.column("SRC_PATH", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("DEST_BE_ID", ScalarType.createType(PrimitiveType.BIGINT))
.column("DEST_PATH", ScalarType.createVarchar(NAME_CHAR_LEN))
.column("TIMEOUT", ScalarType.createType(PrimitiveType.BIGINT))
.column("CREATE_TIME", ScalarType.createType(PrimitiveType.DATETIME))
.column("SCHEDULE_TIME", ScalarType.createType(PrimitiveType.DATETIME))
.column("FINISH_TIME", ScalarType.createType(PrimitiveType.DATETIME))
.column("CLONE_SRC", ScalarType.createType(PrimitiveType.BIGINT))
.column("CLONE_DEST", ScalarType.createType(PrimitiveType.BIGINT))
.column("CLONE_BYTES", ScalarType.createType(PrimitiveType.BIGINT))
.column("CLONE_DURATION", ScalarType.createType(PrimitiveType.DOUBLE))
.column("CLONE_RATE", ScalarType.createType(PrimitiveType.DOUBLE))
.column("FAILED_SCHEDULE_COUNT", ScalarType.createType(PrimitiveType.INT))
.column("FAILED_RUNNING_COUNT", ScalarType.createType(PrimitiveType.INT))
.column("MSG", ScalarType.createVarchar(NAME_CHAR_LEN))
.build(), TSchemaTableType.SCH_FE_TABLET_SCHEDULES);
}

View File

@ -1255,12 +1255,13 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
result.add(String.valueOf(srcPathHash));
result.add(String.valueOf(destBackendId));
result.add(String.valueOf(destPathHash));
result.add(String.valueOf(taskTimeoutMs));
result.add(String.valueOf(taskTimeoutMs)); // milliseconds
result.add(TimeUtils.longToTimeString(createTime));
result.add(TimeUtils.longToTimeString(lastSchedTime));
result.add(TimeUtils.longToTimeString(lastVisitedTime));
result.add(TimeUtils.longToTimeString(finishedTime));
result.add(copyTimeMs > 0 ? String.valueOf((double) copySize / copyTimeMs / 1000.0) : FeConstants.NULL_STRING);
result.add(copyTimeMs > 0 ?
String.valueOf((double) copySize * 1000.0 / copyTimeMs / 1048576.0) : FeConstants.NULL_STRING); // MB/s
result.add(String.valueOf(failedSchedCounter));
result.add(String.valueOf(failedRunningCounter));
result.add(TimeUtils.longToTimeString(lastAdjustPrioTime));
@ -1274,20 +1275,31 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
public TTabletSchedule toTabletScheduleThrift() {
TTabletSchedule result = new TTabletSchedule();
result.setTablet_id(tabletId);
result.setTable_id(tblId);
result.setPartition_id(physicalPartitionId);
result.setTablet_id(tabletId);
result.setType(type.name());
result.setPriority(dynamicPriority != null ? dynamicPriority.name() : "");
result.setState(state != null ? state.name() : "");
result.setTablet_status(tabletHealthStatus != null ? tabletHealthStatus.name() : "");
result.setSchedule_reason(getTabletScheduleStatus());
result.setMedium(storageMedium == null ? "" : storageMedium.name());
result.setPriority(dynamicPriority != null ? dynamicPriority.name() : "");
result.setOrig_priority(origPriority.name());
result.setLast_priority_adjust_time(lastAdjustPrioTime / 1000);
result.setVisible_version(visibleVersion);
result.setCommitted_version(committedVersion);
result.setSrc_be_id(srcReplica == null ? -1 : srcReplica.getBackendId());
result.setSrc_path(String.valueOf(srcPathHash));
result.setDest_be_id(destBackendId);
result.setDest_path(String.valueOf(destPathHash));
result.setTimeout(taskTimeoutMs / 1000); // seconds
result.setCreate_time(createTime / 1000.0);
result.setSchedule_time(lastSchedTime / 1000.0);
result.setFinish_time(finishedTime / 1000.0);
result.setClone_src(srcReplica == null ? -1 : srcReplica.getBackendId());
result.setClone_dest(destBackendId);
result.setClone_bytes(copySize);
result.setClone_duration(copyTimeMs / 1000.0);
result.setClone_duration(copyTimeMs / 1000.0); // seconds
result.setClone_rate(copyTimeMs > 0 ? (double) copySize * 1000.0 / copyTimeMs / 1048576.0 : 0); // MB/s
result.setFailed_schedule_count(failedSchedCounter);
result.setFailed_running_count(failedRunningCounter);
result.setError_msg(errMsg);
return result;
}

View File

@ -41,6 +41,7 @@ import com.starrocks.clone.TabletSchedCtx.Priority;
import com.starrocks.clone.TabletSchedCtx.Type;
import com.starrocks.clone.TabletScheduler.PathSlot;
import com.starrocks.common.Config;
import com.starrocks.common.jmockit.Deencapsulation;
import com.starrocks.server.GlobalStateMgr;
import com.starrocks.system.Backend;
import com.starrocks.task.AgentBatchTask;
@ -181,10 +182,6 @@ public class TabletSchedCtxTest {
AgentTask recoverTask = agentBatchTask.getAllTasks().get(0);
Assertions.assertEquals(be2.getId(), recoverTask.getBackendId());
Assertions.assertEquals(TABLET_ID_1, recoverTask.getTabletId());
TTabletSchedule res = ctx.toTabletScheduleThrift();
Assertions.assertNotNull(res);
Assertions.assertEquals(TABLET_ID_1, res.getTablet_id());
}
@Test
@ -289,11 +286,14 @@ public class TabletSchedCtxTest {
TabletSchedCtx ctx = new TabletSchedCtx(Type.REPAIR, 1, 2, 3, 4, 1000, System.currentTimeMillis());
ctx.setOrigPriority(Priority.NORMAL);
ctx.setTabletStatus(LocalTablet.TabletHealthStatus.VERSION_INCOMPLETE);
Deencapsulation.setField(ctx, "copySize", 1048576L);
Deencapsulation.setField(ctx, "copyTimeMs", 1000L);
List<String> results = ctx.getBrief();
Assertions.assertEquals(25, results.size());
Assertions.assertEquals("1000", results.get(0));
Assertions.assertEquals("REPAIR", results.get(1));
Assertions.assertEquals("VERSION_INCOMPLETE", results.get(3));
Assertions.assertEquals("1.0", results.get(16));
ctx = new TabletSchedCtx(Type.BALANCE, 1, 2, 3, 4, 1001, System.currentTimeMillis());
ctx.setOrigPriority(Priority.NORMAL);
@ -303,4 +303,43 @@ public class TabletSchedCtxTest {
Assertions.assertEquals("BALANCE", results.get(1));
Assertions.assertEquals("CLUSTER_TABLET", results.get(3));
}
@Test
public void testToTabletScheduleThrift() {
TabletSchedCtx ctx = new TabletSchedCtx(Type.REPAIR, 1L, 2L, 3L, 4L, 1000L, System.currentTimeMillis());
ctx.setOrigPriority(Priority.NORMAL);
ctx.setTabletStatus(LocalTablet.TabletHealthStatus.VERSION_INCOMPLETE);
ctx.setStorageMedium(TStorageMedium.HDD);
Replica replica = new Replica(1001L, be1.getId(), 0, Replica.ReplicaState.NORMAL);
replica.setPathHash(123456789L);
ctx.setSrc(replica);
ctx.setDest(be2.getId(), 123456780L);
Deencapsulation.setField(ctx, "copySize", 1048576L);
Deencapsulation.setField(ctx, "copyTimeMs", 1000L);
ctx.setVersionInfo(1L, 2L, 3L, 0L);
TTabletSchedule res = ctx.toTabletScheduleThrift();
Assertions.assertNotNull(res);
Assertions.assertEquals(1000L, res.getTablet_id());
Assertions.assertEquals("REPAIR", res.getType());
Assertions.assertEquals("VERSION_INCOMPLETE", res.getSchedule_reason());
Assertions.assertEquals(be1.getId(), res.getSrc_be_id());
Assertions.assertEquals("123456789", res.getSrc_path());
Assertions.assertEquals(be2.getId(), res.getDest_be_id());
Assertions.assertEquals("123456780", res.getDest_path());
Assertions.assertEquals(1048576, res.getClone_bytes());
Assertions.assertEquals(1, res.getClone_duration(), 0.01);
Assertions.assertEquals(1, res.getClone_rate(), 0.01);
Assertions.assertEquals("HDD", res.getMedium());
Assertions.assertEquals("NORMAL", res.getOrig_priority());
Assertions.assertEquals(0L, res.getLast_priority_adjust_time());
Assertions.assertEquals(1L, res.getVisible_version());
Assertions.assertEquals(2L, res.getCommitted_version());
Assertions.assertEquals(0L, res.getFailed_schedule_count());
Assertions.assertEquals(0L, res.getFailed_running_count());
}
}

View File

@ -1583,15 +1583,26 @@ struct TTabletSchedule {
4: optional string type
5: optional string priority
6: optional string state
7: optional string tablet_status
7: optional string schedule_reason
8: optional double create_time
9: optional double schedule_time
10: optional double finish_time
11: optional i64 clone_src
12: optional i64 clone_dest
11: optional i64 src_be_id
12: optional i64 dest_be_id
13: optional i64 clone_bytes
14: optional double clone_duration
15: optional string error_msg
16: optional double clone_rate
17: optional i64 timeout
18: optional string medium
19: optional string src_path
20: optional string dest_path
21: optional string orig_priority
22: optional i64 last_priority_adjust_time
23: optional i64 visible_version
24: optional i64 committed_version
25: optional i32 failed_schedule_count
26: optional i32 failed_running_count
}
struct TGetTabletScheduleRequest {