You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: lib/shardingcfg.go
+3-3
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ func GetWLCfg() *WLCfg {
76
76
funcgetSQL() string {
77
77
// TODO: add hostname in the comment
78
78
iflen(GetConfig().ShardingPostfix) !=0 {
79
-
returnfmt.Sprintf("SELECT scuttle_id, shard_id, read_status, write_status from %s_shard_map_%s where status = 'Y'", GetConfig().ManagementTablePrefix, GetConfig().ShardingPostfix)
79
+
returnfmt.Sprintf("SELECT /*heraMgmt.Sharding*/ scuttle_id, shard_id, read_status, write_status from %s_shard_map_%s where status = 'Y'", GetConfig().ManagementTablePrefix, GetConfig().ShardingPostfix)
80
80
}
81
81
//TODO: is this still needed?
82
82
slowf:=fmt.Sprintf("slow.%d", os.Getpid())
@@ -86,15 +86,15 @@ func getSQL() string {
86
86
n, err:=f.Read(buf[:63])
87
87
iferr==nil {
88
88
buf[n] =0
89
-
sql:=fmt.Sprintf("SELECT scuttle_id + usleep(%s) - %s, shard_id, read_status, write_status from %s_shard_map where status = 'Y'", string(buf), string(buf), GetConfig().ManagementTablePrefix)
89
+
sql:=fmt.Sprintf("SELECT /*heraMgmt.Sharding*/ scuttle_id + usleep(%s) - %s, shard_id, read_status, write_status from %s_shard_map where status = 'Y'", string(buf), string(buf), GetConfig().ManagementTablePrefix)
// if we get here, it means it can't get the slow query
97
-
returnfmt.Sprintf("SELECT scuttle_id, shard_id, read_status, write_status from %s_shard_map where status = 'Y'", GetConfig().ManagementTablePrefix)
97
+
returnfmt.Sprintf("SELECT /*heraMgmt.Sharding*/ scuttle_id, shard_id, read_status, write_status from %s_shard_map where status = 'Y'", GetConfig().ManagementTablePrefix)
0 commit comments