Commit graph

22 commits

Author SHA1 Message Date
Brian Gough
78828ebbc5 fine grained logging for cpu usage in applyUpdate 2017-05-19 16:00:16 +01:00
Brian Gough
b6efb051e1 add profiling 2017-05-18 11:17:08 +01:00
Brian Gough
b15d2ef796 Revert "fail safely if doc cannot be loaded" 2017-05-15 16:18:40 +01:00
Brian Gough
2ee40d0748 ensure document is in redis before consuming ops 2017-05-12 14:22:18 +01:00
Brian Gough
36407ac726 rename HistoryManager pushUncompressedHistoryOps 2017-05-09 12:02:27 +01:00
Brian Gough
fdf5e8e0b8 get history ops length directly from redis update 2017-05-09 10:34:31 +01:00
James Allen
ed493d8ad3 Rename web -> realtime for consistency with realtime 2017-05-02 15:38:33 +01:00
James Allen
5499a67d78 Add in a consistency check after applying updates that ranges still match 2017-03-15 14:12:06 +00:00
James Allen
dd45a8dd7d Improve logging around hashes and null byte errors 2017-02-27 10:06:24 +01:00
James Allen
0706feb26b Add max limit on number of comments and changes per doc 2017-01-10 16:58:11 +01:00
James Allen
e3fee1a1d1 Rename 'track changes entries' -> 'ranges' 2016-12-08 12:31:43 +00:00
James Allen
4fadd75ef3 Track changes based on flag on op, not global setting 2016-12-02 11:04:21 +00:00
James Allen
e739e86c48 Get basic ChangeTracker hooked up. WIP 2016-11-28 10:14:42 +00:00
James Allen
6ca48523d9 mapSeries -> eachSeries 2016-09-09 15:28:27 +01:00
James Allen
2d82d56f93 Process updates one at a time and write into redis after each one 2016-09-09 11:01:14 +01:00
James Allen
8779f3f686 Only write DocOps atomically with version and lines, after all docs are applied 2016-08-23 16:00:46 +01:00
James Allen
bc00aab7b1 Explicitly separate calls to web and docupdater redis instances 2016-06-17 12:17:22 +01:00
James Allen
f707783aba Remove old methods of triggering doc updates
Remove the old pub/sub listener which is no longer used.

Also remove the DocsWithPendingUpdates set, which used to track
docs waiting to be updated. This was necessary incase messages were
missed on the pub/sub channel, so we knew which docs still had pending
updates. However, now we use the BLPOP queue, these updates just sit in
the queue until a consumer comes back to continue consuming them.
2016-06-01 11:28:23 +01:00
James Allen
945c728db2 Use signed locks so only the locking party can remove their lock 2016-04-13 11:59:56 +01:00
James Allen
333591d087 Extra null check 2015-06-12 10:16:33 +01:00
James Allen
a3847d21d5 Replace UTF-16 surrogate characters with 'replacement character'
In Javascript, characters are 16-bits wide. It does not understand surrogates as characters.

From Wikipedia (http://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane):
"The High Surrogates (U+D800–U+DBFF) and Low Surrogate (U+DC00–U+DFFF) codes are reserved
for encoding non-BMP characters in UTF-16 by using a pair of 16-bit codes: one High Surrogate
and one Low Surrogate. A single surrogate code point will never be assigned a character.""

The main offender seems to be \uD835 as a stand alone character, which would be the first
16-bit character of a blackboard bold character (http://www.fileformat.info/info/unicode/char/1d400/index.htm).
Something must be going on client side that is screwing up the encoding and splitting the
two 16-bit characters so that \uD835 is standalone.
2015-06-12 10:14:35 +01:00
James Allen
e1a7d4f24a Initial open sourcing 2014-02-12 10:40:42 +00:00