Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
7004cf22
Commit
7004cf22
authored
8 months ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
feat: display clusterwide table names in pico.raft_log and other log messages
parent
d7990abc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1118
feat: display clusterwide table names in pico.raft_log and other log messages
Pipeline
#46782
passed
7 months ago
Stage: test
Stage: stress-test
Stage: front-deploy
Changes
2
Pipelines
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/traft/op.rs
+16
-6
16 additions, 6 deletions
src/traft/op.rs
test/int/test_basics.py
+86
-86
86 additions, 86 deletions
test/int/test_basics.py
with
102 additions
and
92 deletions
src/traft/op.rs
+
16
−
6
View file @
7004cf22
...
...
@@ -261,27 +261,37 @@ impl std::fmt::Display for Op {
struct
DisplayDml
<
'a
>
(
&
'a
Dml
);
impl
std
::
fmt
::
Display
for
DisplayDml
<
'_
>
{
fn
fmt
(
&
self
,
f
:
&
mut
std
::
fmt
::
Formatter
)
->
std
::
fmt
::
Result
{
let
table
=
DisplayClusterwideTable
(
self
.0
.table_id
());
match
self
.0
{
Dml
::
Insert
{
table
,
tuple
,
..
}
=>
{
Dml
::
Insert
{
tuple
,
..
}
=>
{
write!
(
f
,
"Insert({table}, {})"
,
DisplayAsJson
(
tuple
))
}
Dml
::
Replace
{
table
,
tuple
,
..
}
=>
{
Dml
::
Replace
{
tuple
,
..
}
=>
{
write!
(
f
,
"Replace({table}, {})"
,
DisplayAsJson
(
tuple
))
}
Dml
::
Update
{
table
,
key
,
ops
,
..
}
=>
{
Dml
::
Update
{
key
,
ops
,
..
}
=>
{
let
key
=
DisplayAsJson
(
key
);
let
ops
=
DisplayAsJson
(
&**
ops
);
write!
(
f
,
"Update({table}, {key}, {ops})"
)
}
Dml
::
Delete
{
table
,
key
,
..
}
=>
{
Dml
::
Delete
{
key
,
..
}
=>
{
write!
(
f
,
"Delete({table}, {})"
,
DisplayAsJson
(
key
))
}
}
}
}
struct
DisplayClusterwideTable
(
SpaceId
);
impl
std
::
fmt
::
Display
for
DisplayClusterwideTable
{
fn
fmt
(
&
self
,
f
:
&
mut
std
::
fmt
::
Formatter
)
->
std
::
fmt
::
Result
{
if
let
Ok
(
table
)
=
crate
::
storage
::
ClusterwideTable
::
try_from
(
self
.0
)
{
f
.write_str
(
table
.name
())
}
else
{
self
.0
.fmt
(
f
)
}
}
}
struct
DisplayAsJson
<
T
>
(
pub
T
);
impl
std
::
fmt
::
Display
for
DisplayAsJson
<&
TupleBuffer
>
{
...
...
This diff is collapsed.
Click to expand it.
test/int/test_basics.py
+
86
−
86
View file @
7004cf22
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment