This commit is contained in:
aozhiwei 2024-07-20 22:45:37 +08:00
parent bb0c57440f
commit 784eb9afdb
2 changed files with 8 additions and 5 deletions

View File

@ -84,21 +84,24 @@ func (this* contribution) internalStat(statTime int64, nowTime int64) bool {
} }
q5.AppendSlice(&params, lockMeta.GetAddress()) q5.AppendSlice(&params, lockMeta.GetAddress())
} }
sqlTpl += ")" sqlTpl += ") LIMIT 1000"
} }
f5.GetGoStyleDb().BatchLoad( err := f5.GetGoStyleDb().BatchLoadFullTable(
constant.BCNFT_DB, constant.BCNFT_DB,
func (lastIdx int64) string { func (lastIdx int64) string {
sql := fmt.Sprintf(sqlTpl, lastIdx) sql := fmt.Sprintf(sqlTpl, lastIdx)
return sql return sql
}, },
params, params,
func () int64 { func () {
return 10 time.Sleep(time.Millisecond * 10)
}, },
func (ds *f5.DataSet) bool { func (ds *f5.DataSet) bool {
return this.loadFromDb(addressHash, ds) return this.loadFromDb(addressHash, ds)
}) })
if err != nil {
return false
}
} }
return false return false
} }

2
third_party/f5 vendored

@ -1 +1 @@
Subproject commit 7685c13942fc25fc89e49640f0b303e029279c7a Subproject commit bc4749825937d2673d23ae61f2c33c6a3fe1abfd