[Box Backup-commit] [boxbackup/boxbackup] de97e8: Refactor GetLine
GitHub
noreply at github.com
Thu Sep 28 21:48:39 BST 2017
Branch: refs/heads/s3_support_merge
Home: https://github.com/boxbackup/boxbackup
Commit: de97e86a896aaab863083dc52b957db744bd3c0d
https://github.com/boxbackup/boxbackup/commit/de97e86a896aaab863083dc52b957db744bd3c0d
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M bin/bbackupctl/bbackupctl.cpp
M bin/bbackupquery/bbackupquery.cpp
M lib/bbackupd/BackupDaemon.cpp
M lib/bbstored/BBStoreDHousekeeping.cpp
M lib/common/CommonException.txt
M lib/common/FdGetLine.cpp
M lib/common/FdGetLine.h
R lib/common/GetLine.cpp
R lib/common/GetLine.h
M lib/common/IOStream.cpp
M lib/common/IOStreamGetLine.cpp
M lib/common/IOStreamGetLine.h
A lib/common/LineBuffer.cpp
A lib/common/LineBuffer.h
M lib/httpserver/HTTPException.txt
M lib/httpserver/HTTPHeaders.cpp
M lib/httpserver/HTTPRequest.cpp
M lib/httpserver/HTTPResponse.cpp
M lib/httpserver/S3Simulator.cpp
M lib/httpserver/S3Simulator.h
M lib/server/ServerControl.cpp
M lib/server/SocketStream.cpp
A test/backupstore/testfiles/bbackupd.conf
A test/backupstore/testfiles/s3simulator.conf
M test/backupstorefix/testbackupstorefix.cpp
M test/basicserver/testbasicserver.cpp
M test/bbackupd/testbbackupd.cpp
M test/common/testcommon.cpp
Log Message:
-----------
Refactor GetLine
The class name was a problem, because the method that we want to call on it is
also called GetLine, which looks too much like a constructor in C++, so I
renamed it to LineBuffer. I haven't yet renamed the child classes.
Also, it was impossible to distinguish between the different causes of
GetLine() returning false (timeout and signal) and EOF could only be checked by
calling a different function. Now all of these causes throw different
exceptions.
This really fixes the problem with attaching a debugger to a process waiting in
GetLine, which would previously cause the read() to return immediately with
EINTR, which we never retried because it looked like a timeout.
Commit: a8c9d047b976f0b134e543d02577df6f34cf8d23
https://github.com/boxbackup/boxbackup/commit/a8c9d047b976f0b134e543d02577df6f34cf8d23
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M lib/common/DebugMemLeakFinder.cpp
M lib/common/MemLeakFinder.h
Log Message:
-----------
Implement placement operator delete
"If the object is being created as part of a new expression, and an exception
is thrown, the object’s memory is deallocated by calling the appropriate
deallocation function. If the object is being created with a placement new
operator, the corresponding placement delete operator is called—that is, the
delete function that takes the same additional parameters as the placement new
operator. If no matching placement delete is found, no deallocation takes
place."
So to avoid memory leaks, we need to implement placement delete operators that
correspond to our placement new, which we use for leak detection (ironically)
in debug builds.
Commit: 6cbdbc2728a7aebbc525af266319fcd780d59fbe
https://github.com/boxbackup/boxbackup/commit/6cbdbc2728a7aebbc525af266319fcd780d59fbe
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M lib/backupclient/BackupDaemonConfigVerify.cpp
M lib/backupstore/BackupAccountControl.cpp
M lib/httpserver/S3Client.h
Log Message:
-----------
Enable support for S3 virtual hosts in BackupAccountControl
This enables the S3 bucket name to be included in the virtual hostname, for
example bucketname.s3.amazonaws.com, when connecting to a different hostname
such as localhost. This makes bucket names usable in tests with
BackupAccountControl.
Commit: 44aaffe8f13c3c253cd46c3edb815ff7e46bdfd8
https://github.com/boxbackup/boxbackup/commit/44aaffe8f13c3c253cd46c3edb815ff7e46bdfd8
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M lib/backupstore/BackupFileSystem.cpp
M lib/backupstore/BackupFileSystem.h
M lib/backupstore/BackupStoreException.txt
Log Message:
-----------
Properly implement S3BackupFileSystem::GetPermanentRefCountDatabase
Commit: 92d3589911e2727e9200d9364d2dc1cc745aa781
https://github.com/boxbackup/boxbackup/commit/92d3589911e2727e9200d9364d2dc1cc745aa781
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M lib/backupstore/BackupFileSystem.cpp
Log Message:
-----------
Remove always-false assertion in S3BackupFileSystem::GetDirectory
This was designed to stop untested code from running. Now we are ready to use
this code, with tests soon to come.
Commit: 4774b1db0c3c7040509cd1fa74266725a2c1734b
https://github.com/boxbackup/boxbackup/commit/4774b1db0c3c7040509cd1fa74266725a2c1734b
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M lib/backupstore/BackupFileSystem.h
M lib/backupstore/StoreTestUtils.cpp
M lib/backupstore/StoreTestUtils.h
M test/backupstore/testbackupstore.cpp
Log Message:
-----------
Add store test helpers for specialised tests
Commit: 03cd458395b4c9485947cea703b5e4677d6fbcfc
https://github.com/boxbackup/boxbackup/commit/03cd458395b4c9485947cea703b5e4677d6fbcfc
Author: Chris Wilson <chris+github at qwirx.com>
Date: 2017-09-28 (Thu, 28 Sep 2017)
Changed paths:
M lib/backupstore/BackupStoreContext.h
M test/backupstore/testbackupstore.cpp
Log Message:
-----------
Make BackupStoreContext::ClearDirectoryCache() public
Needed to clear the cache in backupstore tests specialised for S3.
Compare: https://github.com/boxbackup/boxbackup/compare/62e91dd81619...03cd458395b4
More information about the Boxbackup-commit
mailing list