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
c89f42ba
Commit
c89f42ba
authored
11 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge branch 'stable'
parents
555fe6d3
b559ecbe
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
client/tarantar/indexate.c
+7
-3
7 additions, 3 deletions
client/tarantar/indexate.c
client/tarantar/options.c
+9
-0
9 additions, 0 deletions
client/tarantar/options.c
client/tarantar/options.h
+2
-0
2 additions, 0 deletions
client/tarantar/options.h
client/tarantar/ts.h
+2
-1
2 additions, 1 deletion
client/tarantar/ts.h
with
20 additions
and
4 deletions
client/tarantar/indexate.c
+
7
−
3
View file @
c89f42ba
...
...
@@ -322,6 +322,10 @@ xlog_process(struct ts_spaces *s, char *wal_dir, uint64_t file_lsn,
*
last
=
xs
->
log
.
current
.
hdr
.
lsn
;
if
(
xs
->
log
.
current
.
hdr
.
lsn
<=
start
)
continue
;
if
(
tss
.
opts
.
to_lsn_set
&&
xs
->
log
.
current
.
hdr
.
lsn
>
tss
.
opts
.
to_lsn
)
{
rc
=
1
;
goto
done
;
}
rc
=
xlog_process_row
(
s
,
fileid
,
xs
->
log
.
current_offset
,
r
);
if
(
rc
==
-
1
)
goto
done
;
...
...
@@ -352,8 +356,8 @@ waldir_processof(struct ts_spaces *s, struct tnt_dir *wal_dir, int i)
if
(
i
<
wal_dir
->
count
)
{
rc
=
xlog_process
(
s
,
wal_dir
->
path
,
wal_dir
->
files
[
i
].
lsn
,
tss
.
last_snap_lsn
,
&
tss
.
last_xlog_lsn
);
if
(
rc
==
-
1
)
return
-
1
;
if
(
rc
==
-
1
||
rc
==
-
1
)
return
rc
;
}
for
(
i
++
;
i
<
wal_dir
->
count
;
i
++
)
{
rc
=
xlog_process
(
s
,
wal_dir
->
path
,
wal_dir
->
files
[
i
].
lsn
,
...
...
@@ -361,7 +365,7 @@ waldir_processof(struct ts_spaces *s, struct tnt_dir *wal_dir, int i)
if
(
rc
==
-
1
)
return
-
1
;
}
return
0
;
return
rc
;
}
static
int
...
...
This diff is collapsed.
Click to expand it.
client/tarantar/options.c
+
9
−
0
View file @
c89f42ba
...
...
@@ -44,6 +44,8 @@
static
const
void
*
opts_def
=
gopt_start
(
gopt_option
(
'c'
,
0
,
gopt_shorts
(
'c'
),
gopt_longs
(
"create"
),
NULL
,
"create snapshot file"
),
gopt_option
(
'l'
,
GOPT_ARG
,
gopt_shorts
(
'l'
),
gopt_longs
(
"lsn"
),
" <u64>"
,
"snapshot lsn (latest by default)"
),
gopt_option
(
'?'
,
0
,
gopt_shorts
(
0
),
gopt_longs
(
"help"
),
NULL
,
"display this help and exit"
),
gopt_option
(
'v'
,
0
,
gopt_shorts
(
'v'
),
gopt_longs
(
"version"
),
...
...
@@ -81,6 +83,13 @@ ts_options_process(struct ts_options *opts, int argc, char **argv)
opts
->
mode
=
TS_MODE_VERSION
;
goto
done
;
}
/* lsn */
const
char
*
arg
=
NULL
;
if
(
gopt_arg
(
opt
,
'l'
,
&
arg
))
{
opts
->
to_lsn
=
atoll
(
arg
);
opts
->
to_lsn_set
=
1
;
}
/* generate or verify */
if
(
gopt
(
opt
,
'c'
))
{
opts
->
mode
=
TS_MODE_CREATE
;
...
...
This diff is collapsed.
Click to expand it.
client/tarantar/options.h
+
2
−
0
View file @
c89f42ba
...
...
@@ -9,6 +9,8 @@ enum ts_options_mode {
struct
ts_options
{
enum
ts_options_mode
mode
;
int
to_lsn_set
;
uint64_t
to_lsn
;
const
char
*
file_config
;
struct
tarantool_cfg
cfg
;
};
...
...
This diff is collapsed.
Click to expand it.
client/tarantar/ts.h
+
2
−
1
View file @
c89f42ba
...
...
@@ -7,7 +7,8 @@ struct ts {
struct
ts_reftable
rt
;
uint64_t
last_snap_lsn
;
uint64_t
last_xlog_lsn
;
int
to_lsn_set
;
uint64_t
to_lsn
;
struct
slab_cache
sc
;
struct
region
ra
;
};
...
...
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