Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
da3c974c
Unverified
Commit
da3c974c
authored
Feb 09, 2023
by
Péter Szilágyi
Committed by
GitHub
Feb 09, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ethdb/pebble: fix nil callbacks (#26650)
parent
bf1798e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
pebble.go
ethdb/pebble/pebble.go
+7
-8
No files found.
ethdb/pebble/pebble.go
View file @
da3c974c
...
...
@@ -117,7 +117,6 @@ func (d *Database) onWriteStallEnd() {
// New returns a wrapped pebble DB object. The namespace is the prefix that the
// metrics reporting should use for surfacing internal stats.
func
New
(
file
string
,
cache
int
,
handles
int
,
namespace
string
,
readonly
bool
)
(
*
Database
,
error
)
{
var
db
*
Database
// Ensure we have some minimal caching and file guarantees
if
cache
<
minCache
{
cache
=
minCache
...
...
@@ -140,6 +139,11 @@ func New(file string, cache int, handles int, namespace string, readonly bool) (
if
memTableSize
>
maxMemTableSize
{
memTableSize
=
maxMemTableSize
}
db
:=
&
Database
{
fn
:
file
,
log
:
logger
,
quitChan
:
make
(
chan
chan
error
),
}
opt
:=
&
pebble
.
Options
{
// Pebble has a single combined cache area and the write
// buffers are taken from this too. Assign all available
...
...
@@ -187,13 +191,8 @@ func New(file string, cache int, handles int, namespace string, readonly bool) (
if
err
!=
nil
{
return
nil
,
err
}
// Assemble the wrapper with all the registered metrics
db
=
&
Database
{
fn
:
file
,
db
:
innerDB
,
log
:
logger
,
quitChan
:
make
(
chan
chan
error
),
}
db
.
db
=
innerDB
db
.
compTimeMeter
=
metrics
.
NewRegisteredMeter
(
namespace
+
"compact/time"
,
nil
)
db
.
compReadMeter
=
metrics
.
NewRegisteredMeter
(
namespace
+
"compact/input"
,
nil
)
db
.
compWriteMeter
=
metrics
.
NewRegisteredMeter
(
namespace
+
"compact/output"
,
nil
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment