Commit graph

86 commits

Author SHA1 Message Date
Henry Oswald
9cfa4b3f84 Don't put docs which are already in s3 through archive job
This fixes the bug we saw with 'RangeError: Maximum call stack size exceeded'
if lots of docs are already in s3 cb() gets called synchronously multiple times quickly
which can cause the execption. I am not sure where the recursion is, maybe inside async.

doing setImmediate(cb) also fixes the issue as I beilve it gives the
process chance to clear the stack. Similar to process.nextTick
2015-09-07 14:11:02 +01:00
Henry Oswald
ae75b855b4 added failing test for trying to archive load of docs which are already
in s3
2015-09-07 14:06:20 +01:00
Henry Oswald
738e33a052 change crypto to always use utf-8 as it works with aws 2015-09-01 16:52:02 +01:00
Henry Oswald
aaa2a099f1 change acceptance test to use big naught list of strings 2015-09-01 16:51:10 +01:00
Henry Oswald
192b0af15a added utf-8 char which fails the archive option 2015-09-01 15:47:16 +01:00
Henry Oswald
5dd33ea313 changed back to standard /archive /unarchive 2015-08-18 14:10:53 +01:00
Henry Oswald
5765b59e0c added /deactivate and /reactivate endpoints as web will call those
also fixed acceptence test
2015-08-18 13:31:26 +01:00
Henry Oswald
599b9770f4 add un archive endpoint 2015-08-13 22:48:45 +01:00
Henry Oswald
cf07e2fec5 improve archve doc acceptence tests 2015-08-13 22:48:17 +01:00
Henry Oswald
ef4e437c3f improve doc manager so it calls get doc recursivly 2015-08-13 22:47:33 +01:00
Henry Oswald
6ea284b17b Merge pull request #9 from sharelatex/s3-archive
S3 archive
2015-08-13 14:20:46 +01:00
Henry Oswald
32bf64236b fixed config to work with s3 correctly 2015-08-13 14:16:40 +01:00
Henry Oswald
ddf4692f0d added acceptance test for large doc ~1mb 2015-08-13 13:59:40 +01:00
Henry Oswald
b8884352f6 added some better error logging 2015-08-13 13:59:22 +01:00
Henry Oswald
859e8a0e57 - deal with calling archive twice on same project
- clean up unit tests
- change s3 keys
- use err not error
2015-08-13 13:00:09 +01:00
Henry Oswald
9af2c07c3b always add archiving root in 2015-08-13 12:59:04 +01:00
Brian Gough
aa599b0d90 added event loop monitor 2015-06-23 13:55:33 +01:00
Henry Oswald
6e4ad90cac bumped mongojs version 2015-06-10 15:37:06 +01:00
Henrique Dias
42f2afc4dd remove unarchived docs from s3 2015-06-03 20:05:15 -03:00
Henrique Dias
9a68bfb393 fix unit tests 2015-06-03 12:00:08 -03:00
Henrique Dias
aa23c1da56 md5 check for doc lines 2015-06-03 11:45:47 -03:00
Henrique Dias
5ba14522da handling error 2015-06-02 20:08:50 -03:00
Henrique Dias
a26320013d more acceptance tests 2015-06-02 19:24:45 -03:00
Henrique Dias
0cd2120430 more unit tests for archive feature 2015-06-02 18:13:16 -03:00
Henrique Dias
6add9a0da7 init unit tests 2015-06-02 17:12:11 -03:00
Henrique Dias
5c31e80062 more refactoring 2015-06-02 16:29:32 -03:00
Henrique Dias
ddd26798f1 refactoring
s3 filter in router
2015-06-02 15:55:22 -03:00
Henrique Dias
86f16caeef fix some issues 2015-06-02 15:13:28 -03:00
Henry Oswald
ea92f57acc point where we unset doc lines also search on doc rev to make sure
the document has not been updated
2015-06-02 12:39:49 +01:00
Henry Oswald
60bc7bf4e1 pulled logic for arching docs arpart a bit, can be moved into its own file
hacked out (needs tests) the unarchiving of individual docs & doc updates
2015-06-02 12:36:38 +01:00
Henry Oswald
19f1a9ad82 changed style of async jobs to map to use underscore which is like we
use in the rest of the stack. Also removed a few => binds which are
not needed
2015-06-02 10:59:35 +01:00
Henrique Dias
7c7ff64904 retrieving all docs from s3 2015-06-01 19:36:26 -03:00
Henrique Dias
fa7d3ea857 Merge branch 's3-archive' of https://github.com/heukirne/docstore-sharelatex into s3-archive 2015-06-01 18:25:18 -03:00
Henrique Dias
7f5204f0f7 initial version for archive docs in S3 2015-06-01 18:24:40 -03:00
Henrique Dias
314c735004 initial version for archive docs in S3 2015-06-01 18:22:02 -03:00
Henry Oswald
73a73adf62 make startup message consistent 2015-04-30 15:04:26 +01:00
Henry Oswald
9e91d31abb Merge branch 'doc-collection-only'
Conflicts:
	app/coffee/DocManager.coffee
2015-03-02 08:06:41 +00:00
Henry Oswald
6c568d9cbb don't log out when doc lines are [] as this is a new empty doc 2015-02-27 15:19:08 +00:00
Henry Oswald
d59fb0d590 Merge branch 'master' into doc-collection-only
Conflicts:
	app/coffee/DocManager.coffee
2015-02-27 14:58:38 +00:00
Henry Oswald
53480153e3 if the doc has no lines then it is new and needs to be written 2015-02-27 14:50:08 +00:00
Henry Oswald
32829f0e6e remove old rev, not needed any more 2015-02-27 14:06:06 +00:00
Henry Oswald
a73dc90b00 change mongomangers upsert to use an inc
this is tested and does work with new documents
2015-02-26 16:01:10 +00:00
Henry Oswald
7242119532 simplified DocManager.updateDoc so it calls mongomanager.findDoc
makes the logic for dealing new documents that are not in mongo yet
much simpler
2015-02-26 16:00:28 +00:00
Henry Oswald
5861231548 docstore now only touches doc collection
- need to run migration 1 before using this for this to work
- added acceptence test so new documents updated should be upserted, not return 404
2015-02-26 14:54:08 +00:00
Henry Oswald
3cd3c118d1 don't log out when doc lines are [] as this is a new empty doc 2015-02-23 13:17:55 +00:00
Henry Oswald
daf7c4f68e log out when a doc from the project collection is used 2015-02-22 18:45:21 +00:00
James Allen
18a05d8813 Release version 0.1.2 2015-02-10 13:22:56 +00:00
Henry Oswald
a0832c79e6 return 404 if doc is deleted and include_deleted is not set to true 2015-02-03 14:05:08 +00:00
Henry Oswald
7fe25fe28f improved docstore acceptence tests to deal with changing docs on get all docs 2015-01-27 17:05:07 +00:00
Henry Oswald
7b0b72494f write to doc collection first 2015-01-27 15:05:35 +00:00