Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BugFix: Fixed Improper Method Calls #571

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion server/manager/biz/midware/rbacAuth.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func RuleIDSort(one MetaRule, other MetaRule) bool {
func RBACAuth() gin.HandlerFunc {
return func(c *gin.Context) {
if ACWorker == nil {
ylog.Debugf("RBACAuth", "ACWorker Is nil %s, all request will be passed")
ylog.Debugf("RBACAuth", "ACWorker Is nil, all request will be passed")
c.Next()
return
}
Expand Down
2 changes: 1 addition & 1 deletion server/manager/internal/aconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func GetDefaultConfig() []AgentConfigMsg {
filter := bson.M{"type": DefaultAgentConfig, "version": DefaultConfigVersion}
err := collection.FindOne(context.Background(), filter).Decode(&config)
if err != nil {
ylog.Infof("GetDefaultConfig", "default config is not set, now use empty config, error is :", err.Error())
ylog.Infof("GetDefaultConfig", "default config is not set, now use empty config, error is : %s", err.Error())
return []AgentConfigMsg{}
}
return config.Config
Expand Down
4 changes: 2 additions & 2 deletions server/manager/internal/dbtask/rasp_heartbeat.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ func (w *leaderRaspWriter) Run() {

res, err := raspHbCol.BulkWrite(context.Background(), raspHbWrites, writeOption)
if err != nil {
ylog.Errorf("leaderRaspWriter_BulkWrite", "error:%s len:%s", err.Error(), len(raspHbWrites))
ylog.Errorf("leaderRaspWriter_BulkWrite", "error:%s len:%d", err.Error(), len(raspHbWrites))
} else {
ylog.Debugf("leaderRaspWriter_BulkWrite", "UpsertedCount:%d InsertedCount:%d ModifiedCount:%d ", res.UpsertedCount, res.InsertedCount, res.ModifiedCount)
}
Expand All @@ -367,7 +367,7 @@ func (w *leaderRaspWriter) Run() {
if count >= 100 {
res, err := raspHbCol.BulkWrite(context.Background(), raspHbWrites, writeOption)
if err != nil {
ylog.Errorf("leaderRaspWriter_BulkWrite", "error:%s len:%s", err.Error(), len(raspHbWrites))
ylog.Errorf("leaderRaspWriter_BulkWrite", "error:%s len:%d", err.Error(), len(raspHbWrites))
} else {
ylog.Debugf("leaderRaspWriter_BulkWrite", "UpsertedCount:%d InsertedCount:%d ModifiedCount:%d ", res.UpsertedCount, res.InsertedCount, res.ModifiedCount)
}
Expand Down
2 changes: 1 addition & 1 deletion server/manager/internal/distribute/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ func (sj *SimpleJob) push2Redis(ctx context.Context, key string, list []interfac
if i+gradient < len(list) {
err := sj.Rds.LPush(context.Background(), key, list[i:i+gradient]...).Err()
if err != nil {
ylog.Errorf("SimpleJob", "[job] %s error %s, len of key list %d", sj.Id, err.Error(), key, len(list[i:i+gradient]))
ylog.Errorf("SimpleJob", "[job] %s error %s, key %s len of list %d", sj.Id, err.Error(), key, len(list[i:i+gradient]))
}
} else {
if len(list[i:]) == 0 {
Expand Down