Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
trackrdrd
Commits
ca302808
Commit
ca302808
authored
Apr 12, 2017
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for the overflow condition before appending the req_endt string
parent
55f46917
Pipeline
#168
skipped
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
15 deletions
+22
-15
.gitignore
.gitignore
+2
-2
child.c
src/child.c
+13
-6
toolong.log
src/test/toolong.log
+0
-0
toolong.sh
src/test/toolong.sh
+7
-7
No files found.
.gitignore
View file @
ca302808
...
...
@@ -76,5 +76,5 @@ src/mq/kafka/test/test_*.log
src/mq/kafka/test/test_*.trs
src/test/test_*.log
src/test/test_*.trs
src/test/
regress
.sh.log
src/test/
regress
.sh.trs
src/test/
*
.sh.log
src/test/
*
.sh.trs
src/child.c
View file @
ca302808
...
...
@@ -590,13 +590,20 @@ dispatch(struct VSL_data *vsl, struct VSL_transaction * const pt[], void *priv)
}
snprintf
(
reqend_str
,
REQEND_T_LEN
,
"%s=%u.%06lu"
,
REQEND_T_VAR
,
(
unsigned
)
latest_t
.
tv_sec
,
latest_t
.
tv_usec
);
chunks
=
append
(
de
,
SLT_Timestamp
,
vxid
,
reqend_str
,
REQEND_T_LEN
-
1
);
if
(
chunks
<
0
)
{
LOG_Log
(
LOG_ERR
,
"Chunks exhausted, DATA DISCARDED XID=%u: %s"
,
vxid
,
reqend_str
);
if
(
de
->
end
+
REQEND_T_LEN
>
config
.
max_reclen
)
{
/* Data overflow */
LOG_Log
(
LOG_ERR
,
"Timestamp: Data too long, XID=%u, current length=%d, "
"DISCARDING data=[%s]"
,
vxid
,
de
->
end
,
reqend_str
);
len_overflows
++
;
}
else
{
chunks
=
append
(
de
,
SLT_Timestamp
,
vxid
,
reqend_str
,
REQEND_T_LEN
-
1
);
if
(
chunks
<
0
)
LOG_Log
(
LOG_ERR
,
"Chunks exhausted, DATA DISCARDED XID=%u: %s"
,
vxid
,
reqend_str
);
else
chunks_added
+=
chunks
;
}
else
chunks_added
+=
chunks
;
de
->
occupied
=
1
;
MON_StatsUpdate
(
STATS_OCCUPANCY
,
chunks_added
,
0
);
data_submit
(
de
);
...
...
src/test/toolong.log
View file @
ca302808
No preview for this file type
src/test/toolong.sh
View file @
ca302808
...
...
@@ -22,18 +22,18 @@ rm -f $LOG $MSG
../trackrdrd
-D
-f
toolong.log
-l
$LOG
-d
-c
toolong.conf
# Just filter out the worker thread entries, and the read the last
18
lines
# Just filter out the worker thread entries, and the read the last lines
# in which the data read was logged, as well as the error messages.
CKSUM
=
$(
grep
-v
'Worker 1'
$LOG
|
tail
-
18
|
cksum
)
if
[
"
$CKSUM
"
!=
'
921644137 1188
'
]
;
then
CKSUM
=
$(
grep
-v
'Worker 1'
$LOG
|
tail
-
32
|
cksum
)
if
[
"
$CKSUM
"
!=
'
2318467638 2021
'
]
;
then
echo
"ERROR: Too long test incorrect reader log cksum:
$CKSUM
"
exit
1
fi
#
Just check the whol
e contents of the file MQ output.
MSGS
=
$(
cat
$MSG
)
if
[
"
$
MSGS
"
!=
'key=32772: XID=32772&foo=bar&foo=bar&foo=bar&foo=bar&'
]
;
then
echo
"ERROR: Too long test incorrect output
:
$MSGS
"
#
Check th
e contents of the file MQ output.
CKSUM
=
$(
cksum
$MSG
)
if
[
"
$
CKSUM
"
!=
"4088438759 125
$MSG
"
]
;
then
echo
"ERROR: Too long test incorrect output
log cksum:
$CKSUM
"
exit
1
fi
...
...
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