mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
log file unmap/close errors (#7819)
This commit is contained in:
parent
0b97728862
commit
69ae999059
@ -6,7 +6,6 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
|
||||
dbg "runtime/debug"
|
||||
"syscall"
|
||||
"time"
|
||||
|
@ -20,11 +20,12 @@ import (
|
||||
"bytes"
|
||||
"crypto/ecdsa"
|
||||
"encoding/hex"
|
||||
"golang.org/x/crypto/sha3"
|
||||
"os"
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"golang.org/x/crypto/sha3"
|
||||
|
||||
"github.com/holiman/uint256"
|
||||
libcommon "github.com/ledgerwatch/erigon-lib/common"
|
||||
|
||||
|
2
go.mod
2
go.mod
@ -3,7 +3,7 @@ module github.com/ledgerwatch/erigon
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230706040551-efbc6c260daa
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230706040817-aaa51ec2d93a
|
||||
github.com/ledgerwatch/erigon-snapshot v1.2.1-0.20230622075030-1d69651854c2
|
||||
github.com/ledgerwatch/log/v3 v3.8.0
|
||||
github.com/ledgerwatch/secp256k1 v1.0.0
|
||||
|
4
go.sum
4
go.sum
@ -415,8 +415,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/kylelemons/godebug v0.0.0-20170224010052-a616ab194758 h1:0D5M2HQSGD3PYPwICLl+/9oulQauOuETfgFvhBDffs0=
|
||||
github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c=
|
||||
github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230706040551-efbc6c260daa h1:sCroEMsIMftYOdcknJ8+VMqNgS2/upQt3Bzak1iywGM=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230706040551-efbc6c260daa/go.mod h1:DmziKzY3PtjCCAQxqSYvJbRxru/sNHESud6LgO3YWAI=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230706040817-aaa51ec2d93a h1:d8IBeHc23ER/fI7Oz+c5YT7M0qKzS2r6cO4pyCyBCFE=
|
||||
github.com/ledgerwatch/erigon-lib v0.0.0-20230706040817-aaa51ec2d93a/go.mod h1:DmziKzY3PtjCCAQxqSYvJbRxru/sNHESud6LgO3YWAI=
|
||||
github.com/ledgerwatch/erigon-snapshot v1.2.1-0.20230622075030-1d69651854c2 h1:Ls2itRGHMOr2PbHRDA4g1HH8HQdwfJhRVfMPEaLQe94=
|
||||
github.com/ledgerwatch/erigon-snapshot v1.2.1-0.20230622075030-1d69651854c2/go.mod h1:3AuPxZc85jkehh/HA9h8gabv5MSi3kb/ddtzBsTVJFo=
|
||||
github.com/ledgerwatch/log/v3 v3.8.0 h1:gCpp7uGtIerEz1jKVPeDnbIopFPud9ZnCpBLlLBGqPU=
|
||||
|
@ -1332,7 +1332,7 @@ func hasIdxFile(sn *snaptype.FileInfo, logger log.Logger) bool {
|
||||
logger.Warn("Index file has timestamp before segment file, will be recreated", "segfile", sn.Path, "segtime", stat.ModTime(), "idxfile", fName, "idxtime", idx.ModTime())
|
||||
result = false
|
||||
}
|
||||
_ = idx.Close()
|
||||
idx.Close()
|
||||
case snaptype.Bodies:
|
||||
idx, err := recsplit.OpenIndex(path.Join(dir, fName))
|
||||
if err != nil {
|
||||
@ -1343,7 +1343,7 @@ func hasIdxFile(sn *snaptype.FileInfo, logger log.Logger) bool {
|
||||
logger.Warn("Index file has timestamp before segment file, will be recreated", "segfile", sn.Path, "segtime", stat.ModTime(), "idxfile", fName, "idxtime", idx.ModTime())
|
||||
result = false
|
||||
}
|
||||
_ = idx.Close()
|
||||
idx.Close()
|
||||
case snaptype.Transactions:
|
||||
idx, err := recsplit.OpenIndex(path.Join(dir, fName))
|
||||
if err != nil {
|
||||
@ -1354,7 +1354,7 @@ func hasIdxFile(sn *snaptype.FileInfo, logger log.Logger) bool {
|
||||
log.Warn("Index file has timestamp before segment file, will be recreated", "segfile", sn.Path, "segtime", stat.ModTime(), "idxfile", fName, "idxtime", idx.ModTime())
|
||||
result = false
|
||||
}
|
||||
_ = idx.Close()
|
||||
idx.Close()
|
||||
|
||||
fName = snaptype.IdxFileName(sn.From, sn.To, snaptype.Transactions2Block.String())
|
||||
idx, err = recsplit.OpenIndex(path.Join(dir, fName))
|
||||
@ -1366,7 +1366,7 @@ func hasIdxFile(sn *snaptype.FileInfo, logger log.Logger) bool {
|
||||
logger.Warn("Index file has timestamp before segment file, will be recreated", "segfile", sn.Path, "segtime", stat.ModTime(), "idxfile", fName, "idxtime", idx.ModTime())
|
||||
result = false
|
||||
}
|
||||
_ = idx.Close()
|
||||
idx.Close()
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user