| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
| |
Passing the wrong object ID would just result in an assertion being thrown
(in debug builds) or silently doing the wrong thing (in release builds). I
can't see any useful use for this extra parameter, since we can get the
container ID from the directory anyway.
|
|
|
|
|
|
|
|
|
| |
Allows retrieving the error message for a given code, when we no longer have
the protocol object handy.
Conflicts:
lib/server/makeprotocol.pl.in
|
| |
|
|
|
|
|
| |
An incorrect comment led me to believe that this parameter was the new
directory's AttributesModTime, but actually it was its hash.
|
|
|
|
|
|
|
|
|
| |
If the old refcount database was shorter than the new one, then we could end
up trying to access a nonexistent refcount, triggering an exception, which
prevented all comparison of the old and new refcount databases.
Also, from now on, a mismatch between old and new refcounts is treated as a
housekeeping error, which is detectable in tests.
|
| |
|
|
|
|
|
| |
Using methods instead of macros where possible makes debugging easier.
Especially long macros like this one.
|
|
|
|
|
|
|
|
|
|
| |
Otherwise the protocol might be broken and can't be used any more, even if
we made an effort to return an Error reply instead of throwing an exception.
This used to not be a problem because an Error reply would terminate the
connection anyway, but it no longer does. So if the client also didn't
terminate, but tried to handle the exception and keep using the connection,
then it might find that its next command fails because the protocol is broken.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
When a command fails with an error, and CheckReply throws an exception, the
mStreamsToSend were not deleted.
|
|
|
|
|
|
|
|
|
|
| |
Helps with debugging ConnectionException::Protocol_StreamWhenObjExpected and
ConnectionException::Protocol_ObjWhenStreamExpected errors, which may be caused
by a command returning an error message and failing to consume any uploaded
streams first.
Add extra debugging in ProtocolLocal objects to detect when this happens
during the command itself, which helps with debugging.
|
| |
|
|
|
|
| |
Just like adding a file does.
|
|
|
|
|
| |
Allows creating a directory with a specified modtime (in the parent directory entry).
Tests to come shortly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We pass a std::auto_ptr<SocketStream> to every Protocol subclass when we
construct it, and it takes control of this object. This reduces the risk of:
* accidentally reusing the same SocketStream for multiple Protocols
(it happened to me in testbackupstore);
* holding onto a reference to the SocketStream;
* allowing a locally-scoped SocketStream to go out of scope and be released
while still being referenced by a live Protocol.
|
|
|
|
|
|
|
| |
Reading extended attributes may fail with an error if the file was removed
(race condition) or in tests when generating random nonexistent directory
entries. Handle this more gracefully by not backing up the extended attributes
instead of dying completely.
|
|
|
|
|
|
| |
Rename mrDaemon to mpHousekeeping and make it a pointer, so that it can
officially be NULL, and don't crash if it is, and we fail to get a lock
on the account.
|
| |
|
|
|
|
| |
Was introduced by commit bc8261347880b813af58c4b873e1847cca03778d.
|
| |
|
|
|
|
| |
Fix previous changes by waiting for forked bbstored process during termination.
|
| |
|
| |
|
|
|
|
| |
Useful in tests.
|
|
|
|
| |
Saves ~2 lines each time it's used. And we use it a lot in testbackupstore.
|
|
|
|
|
| |
There could be many reasons for this, including an invalid object being
deleted during the previous check run. And it's definitely not serious.
|
|
|
|
|
| |
Also pass the actual reference count of an object to RaidFileWrite instead
of assuming that it's zero, to avoid accidentally deleting a referenced object.
|
|
|
|
|
|
| |
Fix test/common memory leak checks now that MemBlockStream allocates another
block.
|
| |
|
| |
|
|
|
|
| |
Allows aborting tests from any depth of function calls.
|
| |
|
|
|
|
|
|
| |
Useful for sending simple string messages through Protocols or writing them
to streams. Takes a copy of the string, so you don't need to worry about object
lifetime.
|
|
|
|
|
|
|
|
| |
Track them as not leaks, and suppress warnings about realloc() and free() on
these blocks, because they are actually tracked.
Add missing "throw (std::bad_alloc)" to "operator new" to silence warnings
from the llvm compiler.
|
|
|
|
| |
Adding and deleting files was not always accounted properly before.
|
| |
|
| |
|
|
|
|
| |
It's used in several places, and about to be one more.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Will hopefully prevent future confusion about the meaning of this info
variable.
|
|
|
|
|
|
| |
We don't have a test for it yet, and won't until snapshots are implemented,
but it's a bad idea to merge patches to remove an old version when another
directory is still holding a reference to the patch.
|
|
|
|
|
|
| |
Fix accounting for current, old and deleted files and blocks. Previously there
was confusion over the meaning of NumFiles, now it's defined to mean the number
of current files (neither old nor deleted), similar to BlocksInCurrentFiles.
|
|
|
|
| |
that we're doing so.
|
|
|
|
|
|
| |
Sometimes useful to replace instead of appending to the current tag.
The old tag will be reinstated when the tagger is destroyed.
|
|
|
|
|
| |
This is useful for disambiguating messages coming from different parts of the
application when looking at console output.
|
| |
|