Compare commits

...

1 Commits

Author SHA1 Message Date
georgehao
efca370e1d fix: postgres bulk insert issue (#1780)
Co-authored-by: georgehao <georgehao@users.noreply.github.com>
2026-01-14 16:39:26 +08:00
3 changed files with 4 additions and 3 deletions

View File

@@ -372,7 +372,7 @@ func (h *HistoryLogic) getCachedTxsInfo(ctx context.Context, cacheKey string, pa
}
if start >= total {
return nil, 0, false, nil
return nil, 0, true, nil
}
values, err := h.redis.ZRevRange(ctx, cacheKey, start, end).Result()

View File

@@ -51,7 +51,8 @@ func InitDB(config *Config) (*gorm.DB, error) {
}
db, err := gorm.Open(postgres.Open(config.DSN), &gorm.Config{
Logger: &tmpGormLogger,
CreateBatchSize: 1000,
Logger: &tmpGormLogger,
NowFunc: func() time.Time {
// why set time to UTC.
// if now set this, the inserted data time will use local timezone. like 2023-07-18 18:24:00 CST+8

View File

@@ -5,7 +5,7 @@ import (
"runtime/debug"
)
var tag = "v4.7.10"
var tag = "v4.7.11"
var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {