Hello, I'm still struggling to pass all tests for a custom ActiveRecord storage.
Noticed that there is a small difference in the delete method in the implementations: https://github.com/jmettraux/ruote-dm/blob/master/lib/ruote/dm/storage.rb#L173 https://github.com/jmettraux/ruote-sequel/blob/master/lib/ruote/sequel/storage.rb#L314 Each doc has just on rev, right? so it'd be ok to wipe all by ide and typ? Looking at the put logic: nrev = doc['_rev'].to_i + 1 does not seem safe [concurrency]. Shouldn't we increment this on the DB side? or am I missing something? best regards, Pedro On May 6, 4:39 pm, Pedro Teixeira <[email protected]> wrote: > yes.. from time to time, all documents are deleted. > It's weird.. haven't found explanation yet :( > > for example, from the mysql log: > > DELETE FROM `documents` WHERE ((`documents`.`rev` < 3 AND > `documents`.`typ` = 'variables' AND `documents`.`ide` = 'trackers')) > DELETE FROM `documents` WHERE ((`documents`.`rev` < 5 AND > `documents`.`typ` = 'configurations' AND `documents`.`ide` = > 'participant_list')) > > and many specific ides also: > DELETE FROM `documents` WHERE ((`documents`.`typ` = 'msgs' AND > `documents`.`rev` = 1 AND `documents`.`ide` = '18341!70260186606000! > 2011-05-06!1304709106.767378!000')) > > will try to run some unit tests to figure it out. > > cheers, > Pedro > > On May 5, 8:43 pm, John Mettraux <[email protected]> wrote: > > > > > > > > > On Thu, May 05, 2011 at 12:31:46PM -0700, Pedro Teixeira wrote: > > > > I am also seeing the documents table being cleaned (appears > > > periodically).. would you have any clues for this to happen? > > > Hello Pedro, > > > sorry no idea. There is no such code in ruote, it would seriously weaken > > any usefulness it could have. Monitor the deletes in your storage > > implementation. > > > Also is the table really "cleaned" or are you hitting a state of your db > > where your table appears "clean". > > > From your description, I understand : "from time to time, there is > > something that deletes all the records in the table documents". Is that it ? > > > -- > > John Mettraux -http://jmettraux.wordpress.com -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
