Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
tarantool
Commits
c7185149
Commit
c7185149
authored
14 years ago
by
Yuriy Vostrikov
Browse files
Options
Downloads
Patches
Plain Diff
[box] now replica reports its lag
parent
706ef774
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
core/log_io.c
+3
-0
3 additions, 0 deletions
core/log_io.c
core/log_io_remote.c
+1
-0
1 addition, 0 deletions
core/log_io_remote.c
include/log_io.h
+1
-1
1 addition, 1 deletion
include/log_io.h
mod/silverbox/box.c
+2
-0
2 additions, 0 deletions
mod/silverbox/box.c
with
7 additions
and
1 deletion
core/log_io.c
+
3
−
0
View file @
c7185149
...
...
@@ -1177,6 +1177,9 @@ write_to_disk(void *_state, struct tbuf *t)
u32
result
=
0
;
int
suffix
=
0
;
/* we're not running inside ev_loop, so update ev_now manually */
ev_now_update
();
/* caller requested termination */
if
(
t
==
NULL
)
{
if
(
wal
!=
NULL
)
...
...
This diff is collapsed.
Click to expand it.
core/log_io_remote.c
+
1
−
0
View file @
c7185149
...
...
@@ -129,6 +129,7 @@ pull_from_remote(void *state)
for
(;;)
{
row
=
remote_read_row
(
h
->
r
->
confirmed_lsn
+
1
);
h
->
r
->
recovery_lag
=
ev_now
()
-
row_v11
(
row
)
->
tm
;
h
->
r
->
recovery_last_update_tstamp
=
ev_now
();
if
(
h
->
handler
(
h
->
r
,
row
)
<
0
)
continue
;
...
...
This diff is collapsed.
Click to expand it.
include/log_io.h
+
1
−
1
View file @
c7185149
...
...
@@ -84,7 +84,7 @@ struct recovery_state {
log_io_class->reader is responsible of converting data from old format */
row_handler
*
wal_row_handler
,
*
snap_row_handler
;
ev_timer
wal_timer
;
ev_tstamp
recovery_lag
;
ev_tstamp
recovery_lag
,
recovery_last_update_tstamp
;
int
snap_io_rate_limit
;
...
...
This diff is collapsed.
Click to expand it.
mod/silverbox/box.c
+
2
−
0
View file @
c7185149
...
...
@@ -1886,6 +1886,8 @@ mod_info(struct tbuf *out)
tbuf_printf
(
out
,
" pid: %i
\r\n
"
,
getpid
());
tbuf_printf
(
out
,
" wal_writer_pid: %"
PRIi64
"
\r\n
"
,
(
i64
)
recovery_state
->
wal_writer
->
pid
);
tbuf_printf
(
out
,
" lsn: %"
PRIi64
"
\r\n
"
,
recovery_state
->
confirmed_lsn
);
tbuf_printf
(
out
,
" recovery_lag: %.3f
\r\n
"
,
recovery_state
->
recovery_lag
);
tbuf_printf
(
out
,
" recovery_last_update: %.3f
\r\n
"
,
recovery_state
->
recovery_last_update_tstamp
);
tbuf_printf
(
out
,
" status: %s
\r\n
"
,
status
);
}
...
...
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