diff --git a/lib/querybindblocker.go b/lib/querybindblocker.go index 8ad2ad0..d9f34d9 100644 --- a/lib/querybindblocker.go +++ b/lib/querybindblocker.go @@ -160,7 +160,7 @@ func loadBlockQueryBind(db *sql.DB) { } defer conn.Close() - q := fmt.Sprintf("SELECT /*queryBindBlocker*/ %ssqlhash, %ssqltext, bindvarname, bindvarvalue, blockperc, %smodule FROM %s_rate_limiter where %smodule='%s'", GetConfig().StateLogPrefix, GetConfig().StateLogPrefix, GetConfig().StateLogPrefix, GetConfig().ManagementTablePrefix, GetConfig().StateLogPrefix, g_module) + q := fmt.Sprintf("SELECT /*heraMgmt.QueryBindBlocker*/ %ssqlhash, %ssqltext, bindvarname, bindvarvalue, blockperc, %smodule FROM %s_rate_limiter where %smodule='%s'", GetConfig().StateLogPrefix, GetConfig().StateLogPrefix, GetConfig().StateLogPrefix, GetConfig().ManagementTablePrefix, GetConfig().StateLogPrefix, g_module) logger.GetLogger().Log(logger.Info, "Loading query bind blocker meta-sql "+q) stmt, err := conn.PrepareContext(ctx, q) if err != nil { diff --git a/lib/racmaint.go b/lib/racmaint.go index 0221db4..0f97bf1 100644 --- a/lib/racmaint.go +++ b/lib/racmaint.go @@ -95,7 +95,7 @@ func racMaintMain(shard int, interval int, cmdLineModuleName string) { tempKey.module = "" prev[tempKey] = racRow } - racSQL := fmt.Sprintf("/*shard=%d*/ SELECT inst_id, UPPER(status), status_time, UPPER(module) "+ + racSQL := fmt.Sprintf("/*heraMgmt.racMaintShard=%d*/ SELECT inst_id, UPPER(status), status_time, UPPER(module) "+ "FROM %s_maint "+ "WHERE UPPER(machine) = ? and "+ "UPPER(module) in ( ?, ? ) "+ //IN ( UPPER(sys_context('USERENV', 'MODULE')), UPPER(sys_context('USERENV', 'MODULE') || '_TAF' ) ) "+ diff --git a/lib/shardingcfg.go b/lib/shardingcfg.go index c6dac50..a529ec0 100644 --- a/lib/shardingcfg.go +++ b/lib/shardingcfg.go @@ -76,7 +76,7 @@ func GetWLCfg() *WLCfg { func getSQL() string { // TODO: add hostname in the comment if len(GetConfig().ShardingPostfix) != 0 { - return fmt.Sprintf("SELECT scuttle_id, shard_id, read_status, write_status from %s_shard_map_%s where status = 'Y'", GetConfig().ManagementTablePrefix, GetConfig().ShardingPostfix) + return fmt.Sprintf("SELECT /*heraMgmt.Sharding*/ scuttle_id, shard_id, read_status, write_status from %s_shard_map_%s where status = 'Y'", GetConfig().ManagementTablePrefix, GetConfig().ShardingPostfix) } //TODO: is this still needed? slowf := fmt.Sprintf("slow.%d", os.Getpid()) @@ -86,7 +86,7 @@ func getSQL() string { n, err := f.Read(buf[:63]) if err == nil { buf[n] = 0 - 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) + 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 logger.GetLogger().V(logger.Warning) { logger.GetLogger().Log(logger.Warning, "slow shard map query ", sql) } @@ -94,7 +94,7 @@ func getSQL() string { } } // if we get here, it means it can't get the slow query - return fmt.Sprintf("SELECT scuttle_id, shard_id, read_status, write_status from %s_shard_map where status = 'Y'", GetConfig().ManagementTablePrefix) + return fmt.Sprintf("SELECT /*heraMgmt.Sharding*/ scuttle_id, shard_id, read_status, write_status from %s_shard_map where status = 'Y'", GetConfig().ManagementTablePrefix) } /*