[SERVER-7036] long log lines are logged with added NULs when truncated Created: 13/Sep/12 Updated: 11/Jul/16 Resolved: 21/Sep/12 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Logging |
| Affects Version/s: | 2.2.0 |
| Fix Version/s: | 2.2.2, 2.3.0 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Tad Marshall | Assignee: | Tad Marshall |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Participants: |
| Description |
|
The code that logs the beginning and end of lines longer than 10 KB inserts two NULs into the log. At lines 339 and 342 in src/mongo/util/log.cpp in Logstream::flush(), the calls to b.appendStr() should include a 'false' second argument to prevent the addition of unwanted NUL characters. This code:
should be
|
| Comments |
| Comment by auto [ 06/Nov/12 ] |
|
Author: {u'date': u'2012-09-21T17:55:18Z', u'email': u'tad@10gen.com', u'name': u'Tad Marshall'}Message: Pass 'false' for includeEndingNull in two calls to BufBuilder::appendStr |
| Comment by auto [ 21/Sep/12 ] |
|
Author: {u'date': u'2012-09-21T10:55:18-07:00', u'name': u'Tad Marshall', u'email': u'tad@10gen.com'}Message: Pass 'false' for includeEndingNull in two calls to BufBuilder::appendStr |