Skip to content

Commit

Permalink
fix: return all config #3855
Browse files Browse the repository at this point in the history
  • Loading branch information
xfan0805 authored and zhangzhw8 committed Apr 8, 2024
1 parent 360dd92 commit f1a8008
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 1 addition & 2 deletions dbm-services/mysql/db-partition/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ import (

"dbm-services/common/go-pubpkg/apm/metric"
"dbm-services/common/go-pubpkg/apm/trace"
"dbm-services/mysql/db-partition/monitor"

"dbm-services/mysql/db-partition/assests"
"dbm-services/mysql/db-partition/cron"
"dbm-services/mysql/db-partition/model"
"dbm-services/mysql/db-partition/monitor"
"dbm-services/mysql/db-partition/router"
)

Expand Down
3 changes: 3 additions & 0 deletions dbm-services/mysql/db-partition/service/manage_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func (m *QueryParititionsInput) GetPartitionsConfig() ([]*PartitionConfigWithLog
slog.Error(vsql, "execute error", err)
return nil, 0, err
}
if m.Limit == -1 {
m.Limit = cnt.Count
}

limitCondition := fmt.Sprintf("limit %d offset %d", m.Limit, m.Offset)
if m.OrderBy == "" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type QueryParititionsInput struct {
ImmuteDomains []string `json:"immute_domains"`
DbLikes []string `json:"dblikes"`
TbLikes []string `json:"tblikes"`
Limit int `json:"limit"`
Limit int64 `json:"limit"`
Offset int `json:"offset"`
OrderBy string `json:"order_by"`
AscDesc string `json:"asc_desc"`
Expand Down

0 comments on commit f1a8008

Please sign in to comment.