| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The copy in the metadata storage can get corrupted, e.g. due to low level
crashes or running out of battery (see OLPC#11372 [1] for a real-life
example).
This is especially problematic for the uid property, since without it the
caller (i.e. the Journal) can't even figure out which entry to delete.
[1] https://dev.laptop.org/ticket/11372
Reported-by: Gary Martin <garycmartin@googlemail.com>
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
|
|
|
|
|
|
| |
If an empty file path has been passed (indicating a metadata-only update),
there is no need to read the potentially huge data file and recalculate its
checksum.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a minimal test suite for the data store operating on public DBus API
level. Checks all public API calls, including some simple performance
measurements.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
create mode 100644 tests/.gitignore
create mode 100644 tests/Makefile
create mode 100644 tests/__init__.py
create mode 100644 tests/basic_api_v2.txt
create mode 100755 tests/runalltests.py
create mode 100644 tests/test_massops.py
create mode 100644 tests/test_migration_v1_v2.py
|
| |
|
|
|
|
|
|
|
|
| |
Consistent results are important for the test suite.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
---
v1->v2: Better handling of unsupported order_by values
|
|
|
|
|
| |
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We don't want anyone to be able to alter a file that is inside the data store,
bypassing the API.
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Calling datastore.get() and passing the file name back into datastore.update()
for the same entry with transfer_ownership set to False destroyed the data
file.
This was because source and destination file are identical (hard links) and we
overwrote the destination file in AsyncCopy.start() without unlinking it
first.
Fix this by unlinking the destination file if it exists.
Reported-By: Daniel Drake <dsd@laptop.org>
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
|
| |
|
|
|
|
|
|
|
|
| |
The timestamp property might be missing due to incomplete writes (out of
power, system crash) or software bugs.
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Simon Schampijer <simon@laptop.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
No other name I can think of is a better fit and no external code is using
this class, so it isn't an issue.
Disabling the warning reduces pylint clutter and makes it easier to spot real
issues.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
|
|
|
|
|
|
| |
Caught by pylint.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
|
|
|
|
| |
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This partially(possibly) fixes #2149 issue
|
| |
|
| |
|
| |
|
|
|
|
| |
This will ensure it gets set when upgrading from older datastores.
|
|
|
|
| |
Don't fail indexing if filesize is missing.
|
| |
|
|
|
|
|
|
|
|
|
| |
This drastically reduces the chance of data loss in the journal on
crash or power failure.
The previous timeout was set to 60 seconds. It is not clear how much
time flushing the journal takes on an XO-1. Until we measure, 5 and 60
are equally unjustified random numbers.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Upgrading directly from 0.82 to 0.86/0.88 didn't migrate the data store
contents because LayoutManager._is_empty() doesn't check for 0.82 data store
entries.
This patch fixes _is_empty() to recognize 0.82 data store contents.
Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
|
| |
|
| |
|
| |
|
| |
|