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
6afb717b
Unverified
Commit
6afb717b
authored
Mar 22, 2022
by
rjl493456442
Committed by
GitHub
Mar 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/rawdb: fix db commands (#24540)
parent
51de2bc9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
freezer_table.go
core/rawdb/freezer_table.go
+9
-2
No files found.
core/rawdb/freezer_table.go
View file @
6afb717b
...
...
@@ -153,8 +153,15 @@ func newTable(path string, name string, readMeter metrics.Meter, writeMeter metr
if
err
!=
nil
{
return
nil
,
err
}
// Will fail if the table is legacy(no metadata)
meta
,
err
=
openFreezerFileForReadOnly
(
filepath
.
Join
(
path
,
fmt
.
Sprintf
(
"%s.meta"
,
name
)))
// TODO(rjl493456442) change it to read-only mode. Open the metadata file
// in rw mode. It's a temporary solution for now and should be changed
// whenever the tail deletion is actually used. The reason for this hack is
// the additional meta file for each freezer table is added in order to support
// tail deletion, but for most legacy nodes this file is missing. This check
// will suddenly break lots of database relevant commands. So the metadata file
// is always opened for mutation and nothing else will be written except
// the initialization.
meta
,
err
=
openFreezerFileForAppend
(
filepath
.
Join
(
path
,
fmt
.
Sprintf
(
"%s.meta"
,
name
)))
if
err
!=
nil
{
return
nil
,
err
}
...
...
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