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
068a9953
Commit
068a9953
authored
10 years ago
by
Dmitry E. Oboukhov
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.com:tarantool/tarantool
parents
48d4313d
8be1988a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmake/BuildSophia.cmake
+1
-0
1 addition, 0 deletions
cmake/BuildSophia.cmake
src/iproto.cc
+12
-1
12 additions, 1 deletion
src/iproto.cc
test/replication/status.test.py
+39
-0
39 additions, 0 deletions
test/replication/status.test.py
with
52 additions
and
1 deletion
cmake/BuildSophia.cmake
+
1
−
0
View file @
068a9953
...
...
@@ -7,6 +7,7 @@ macro(sophia_build)
add_custom_command
(
OUTPUT
${
PROJECT_SOURCE_DIR
}
/third_party/sophia/db/libsophia.a
WORKING_DIRECTORY
${
PROJECT_SOURCE_DIR
}
/third_party/sophia
COMMAND $
(
MAKE
)
-C db
DEPENDS
${
CMAKE_SOURCE_DIR
}
/CMakeCache.txt
)
else
()
add_custom_command
(
OUTPUT
${
PROJECT_BINARY_DIR
}
/third_party/sophia
...
...
This diff is collapsed.
Click to expand it.
src/iproto.cc
+
12
−
1
View file @
068a9953
...
...
@@ -490,6 +490,7 @@ iproto_enqueue_batch(struct iproto_connection *con, struct ibuf *in)
const
char
*
pos
=
reqstart
;
/* Read request length. */
if
(
mp_typeof
(
*
pos
)
!=
MP_UINT
)
{
invalid_length:
tnt_raise
(
IllegalParams
,
"Invalid MsgPack - packet length"
);
}
...
...
@@ -497,7 +498,17 @@ iproto_enqueue_batch(struct iproto_connection *con, struct ibuf *in)
break
;
uint32_t
len
=
mp_decode_uint
(
&
pos
);
/* Skip fixheader */
/*
* A hack to support padding after packet length.
*/
ptrdiff_t
need_bytes
=
IPROTO_FIXHEADER_SIZE
-
(
pos
-
reqstart
);
if
(
need_bytes
>
0
&&
mp_typeof
(
*
pos
)
==
MP_STR
)
{
uint32_t
padding
;
mp_decode_str
(
&
pos
,
&
padding
);
if
(
padding
+
1
!=
need_bytes
)
goto
invalid_length
;
}
const
char
*
reqend
=
pos
+
len
;
if
(
reqend
>
in
->
end
)
break
;
...
...
This diff is collapsed.
Click to expand it.
test/replication/status.test
→
test/replication/status.test
.py
+
39
−
0
View file @
068a9953
# encoding: tarantool
import
os
import
time
import
re
import
time
from
lib.tarantool_server
import
TarantoolServer
# master server
master
=
server
# replica server
replica
=
TarantoolServer
()
replica
.
deploy
(
"replication/cfg/replica.cfg"
,
replica
.
find_exe
(
self
.
args
.
builddir
),
os
.
path
.
join
(
self
.
args
.
vardir
,
"replica"
))
replica
.
script
=
"
replication/replica.lua
"
replica
.
rpl_master
=
master
replica
.
vardir
=
os
.
path
.
join
(
master
.
vardir
,
'
replica
'
)
replica
.
deploy
()
replica
.
get_param
(
"
lsn
"
)
status
=
replica
.
admin
.
execute_no_reconnect
(
"lua box.info.status"
,
True
)
cycles
=
0
status
=
replica
.
admin
.
execute_no_reconnect
(
"
box.info.status
"
,
True
)
while
(
re
.
search
(
r
'
replica/.*/(connecting|connected)\n
'
,
status
)
==
None
and
cycles
<
500
):
time
.
sleep
(
0.01
)
status
=
replica
.
admin
.
execute_no_reconnect
(
"
box.info.status
"
,
True
)
cycles
+=
1
print
(
re
.
search
(
r
'
replica/.*/(connecting|connected)\n
'
,
status
)
!=
None
)
server
.
stop
()
status
=
replica
.
admin
.
execute_no_reconnect
(
"lua box.info.status"
,
True
)
master
.
stop
()
cycles
=
0
while
(
re
.
search
(
r
'
replica/.*/(connecting|failed)\n
'
,
status
)
==
None
and
cycles
<
500
):
time
.
sleep
(
0.01
)
status
=
replica
.
admin
.
execute_no_reconnect
(
"
box.info.status
"
,
True
)
cycles
+=
1
print
(
re
.
search
(
r
'
replica/.*/(connecting|failed)\n
'
,
status
)
!=
None
)
# Cleanup.
replica
.
stop
()
replica
.
cleanup
(
True
)
server
.
deploy
(
self
.
suite_ini
[
"config"
])
# vim: syntax=python
master
.
deploy
()
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