summaryrefslogtreecommitdiff
path: root/client
AgeCommit message (Collapse)Author
2016-12-12[refactor] adapt fetcher to decryptorKali Kaneko
2016-12-12[feature] blob encryptor / decryptorKali Kaneko
2016-12-12[refactor] remove encryption poolKali Kaneko
2016-12-12[feature] streaming crypto implementationKali Kaneko
2016-12-12[feature] stream content in a separate lineVictor Shyba
This allow different paths for raw data and metadata, avoiding unnecessary json parsing.
2016-12-12[bug] handle 400Victor Shyba
There was an if without an else on error handler that avoided handling errors that falled back current logic. Added a generic one to the tail so we dont miss it.
2016-12-12[feature] upload streamingVictor Shyba
1) enable HTTP 1.1 chunked upload on server 2) make the client sync.py generate a list of function calls instead of a list of full docs 3) disable encryption pool 4) make the doc encryption a list of function calls 5) create a twisted protocol for sending 6) make a producer that calls the doc generation as necessary
2016-12-12[feature] streaming download protocolVictor Shyba
This commit finishes reversion into u1db original streaming protocol for downloads.
2016-12-12[refactor] remove decpoolVictor Shyba
It's not being used
2016-12-12[bug] use an empty string to represent tumbstonesVictor Shyba
If a doc doesnt have a content it means it was deleted. Sync stream was unable to represent this state.
2016-12-12[test] commit isnt part of the backend apiVictor Shyba
Check if the backend provides a commit method before calling or we will break the tests with InMemoryDatabase
2016-12-12[feature] simple adaptation to let the client runVictor Shyba
Make the client parse a 2-line doc on sync download stream.
2016-12-12[bug] disable decpoolVictor Shyba
Temporary fix for server streaming
2016-12-12[feature] use transactions on syncVictor Shyba
We were using 1 transaction per doc, which is bad. Reference: http://stackoverflow.com/questions/1711631/improve-insert-per-second-performance-of-sqlite Code now uses 1 transaction for the whole sync.
2016-11-09[pkg] update leap requirements files0.9.0rc10.9.0drebs
2016-10-12[bug] remove finalClose from SQLCipherU1DBSyncTulio Casagrande
We discovered that class was registering a `finalClose` to be executed on reactor shutdown. On the multiuser scenario, a logout destroys Soledad and should properly terminate everything related to it. That SQLCipherU1DBSync instance was being held even after logout by the reactor so it could call that `finalClose` on shutdown. The `finalClose` only set running to False and set a `shutdownID` that was not used anywhere else, so we removed it and moved setting running to False to the `close` function method. That way we preserve the functionality but let the instance be properly garbage collected on logout.
2016-09-30[bug] use % for formattingVictor Shyba
Otherwise it will put the exception as an additional parameter.
2016-09-22[style] standardize log messagesdrebs
2016-09-22[feat] centralize logging and use twisted.logger by defaultdrebs
2016-09-06[style] pep8Kali Kaneko
2016-09-02[bug] fail gracefully if dbsyncer has not been initializedKali Kaneko
this is needed for some mail tests.
2016-08-29[pkg] remove deprecated requirements-testing.pipdrebs
2016-08-23[doc] improve SQLITE_MAX_VARIABLE_NUMBER commentsVictor Shyba
2016-08-22[bug] limit pool comnsumption to 900 docsVictor Shyba
This was discovered during load tests: Trying to process more than 999 docs triggers an error on SQLite due a select query not supporting 999 values to query.
2016-08-02[test] avoid race condition on test_processing_orderVictor Shyba
test_processing_order aims to check that unordered docs wont be processed, but if we let the pool start and advance Twisted LoopingCall clock right before calling the processing method manually, the process method will run concurrently and cause a race condition issue.
2016-07-18[pkg] remove pixelated from requirements-latest.pipChristoph Kluenter
modifying original PR [0] by cristoph to account for the recent vendoring of l2db code, which means we no longer depend on u1db/dirspec. I expect the whole mess about the venv setup to be further simplified pretty soon, since we are going to merge most of the leap.* packages into a couple of repos. [0] https://github.com/leapcode/soledad/pull/327
2016-07-14[pkg] bump changelog to 0.8.10.8.1Kali Kaneko
2016-07-13[style] pep8Kali Kaneko
2016-07-12[refactor] make u1db connection pool args explicitdrebs
2016-07-12[bug] properly trap db errors and close resourcesdrebs
SQLCipher database access errors can raise Soledad exceptions. Database access and multithreading resources are allocated in different places, so we have to be careful to close all multithreading mechanismis in case of database access errors. If we don't, zombie threads may haunt the reactor. This commit adds SQLCipher exception trapping and Soledad exception raising for database access errors, while properly shutting down multithreading resources.
2016-07-12[pkg] remove unneeded dirspec exceptionsdrebs
2016-07-12[bug] use default sqlcipher timeoutdrebs
2016-07-12[refactor] remove u1db dep from support codedrebs
2016-07-12[refactor] make tests use l2db submoduleKali Kaneko
From this moment on, we embed a fork of u1db called l2db.
2016-06-22[style] pep8Kali Kaneko
2016-06-22[style] pep8 compatibility: indent and white spaceNavaL
It was breaking E126 and E202 before
2016-06-15[bug] move the decryption to a threadpool tooKali Kaneko
2016-06-15[bug] initialize OpenSSL context just onceKali Kaneko
Do not initialize the openssl context on each call to decrypt. I'm not 100% sure of the causal chain, but it seems that the initialization of the osrandom engine that openssl backend does might be breaking havoc when sqlcipher is calling rand_bytes concurrently. further testing is needed to confirm this is the ultimate cause, but in my tests this change avoids the occurrence of the dreaded Floating Point Exception in soledad/sqlcipher. - Resolves: #8180
2016-06-08[bug] install pip from default locationdrebs
Old versions of pip do not accept the --trusted-host option and will complain when trying to upgrade pip from wheel. To fix that we upgrade pip from usual location instead of doing it from wheel.
2016-06-07[pkg] remove unused chardet dependencyKali Kaneko
2016-06-06[feat] add recovery doc format versiondrebs
2016-06-06[feature] add sync phase statsdrebs
2016-06-06[bug] ensures docs_received table has the sync_id columnNavaL
For the case where the user already has data synced, this commit will migrate the docs_received table to have the column sync_id. That is required by the refactoring in the previous commits.
2016-06-06[bug] delete all docs on start and ensure isolationVictor Shyba
Docs created from one failed sync would be there for the next one, possibly causing a lot of hard to find errors. This commit adds a sync_id field to track each sync documents isolated and cleans up the pool on start instead of constructor.
2016-06-06[refactor] encdecpool queries and testingVictor Shyba
This commit adds tests for doc ordering and encdecpool control (start/stop). Also optimizes by deleting in batch and checking for a sequence in memory before asking the local staging for documents.
2016-06-06[refactor] bye multiprocessing poolVictor Shyba
This commit removes the multiprocessing pool and gives a step closer to make encdecpool simpler. Download speed is now at a constant rate, CPU usage lower and reactor responding fast when running with a HTTP server like Pixelated.
2016-06-06[feature] use deferred semaphoreKali Kaneko
2016-06-06[bug] remove doc content conversion to unicodedrebs
Theoretically (until now), Soledad inherits from U1DB the behaviour of only accepting valid JSON for documents contents. JSON documents only allow for unicode strings. Despite that, until now we had implemented lossy convertion to unicode to avoid encoding errors when dumping/loading JSON content. This allowed for API users to pass non-unicode to Soledad, but caused the application to take more time because of conversion. There were 2 problem with this: (1) conversion may take a long time and a lot of memory when convertin large payloads; and (2) conversion was being made before deferring to the adbapi, and this was blocking the reactor. This commit completelly removes the conversion to unicode, thus leaving the responsibility of unicode conversion to users of the Soledad API.
2016-05-23[refactor] remove user_id argument from Soledad initCaio Carrara
The constructor method of Soledad was receiving two arguments for user id. One of them was optional with None as default. It could cause an inconsistent state with uuid set but userid unset. This change remove the optional user_id argument from initialization method and return the uuid if anyone call Soledad.userid method.
2016-05-18[pkg] update to new versioneer json formatKali Kaneko