=== kadams54 is now known as kadams54-away
thumper    c.Assert(info, jc.DeepEquals, expect)20:58
thumper... obtained state.FilesystemAttachmentInfo = state.FilesystemAttachmentInfo{MountPoint:"", ReadOnly:true}20:58
thumper... expected state.FilesystemAttachmentInfo = state.FilesystemAttachmentInfo{MountPoint:"", ReadOnly:true}20:58
thumper... mismatch at .ReadOnly: unequal; obtained true; expected true20:58
fwereademenn0, offhand, why does envStateCollection reject bson.M queries?21:22
* menn0 has to look at the code21:23
thumperfwereade: did you see that error above?21:24
fwereademenn0, I think it's just a "nobody uses bsom.M queries" unless you know different21:24
fwereadethumper, huh21:24
fwereadethumper, that's ...interesting :/21:24
menn0fwereade: I /think/ it was that they weren't being used so YAGNI21:24
fwereademenn0, cool21:25
menn0fwereade: there's no technical reason they couldn't be supported21:25
fwereademenn0, yeah, I've already written it :)21:25
menn0fwereade: map based queries are slightly finicky/dangerous anyway21:25
menn0fwereade: b/c of field ordering21:25
fwereademenn0, just thought I'd better check there wasn't a good reason21:25
fwereademenn0, hmm, can it subtly change complex queries?21:26
menn0fwereade: more that a query might not used a query if the field order in the query doesn't match21:27
fwereademenn0, I've tended to use bson.D out of habit, but .Ms are often that tiny bit cleaner to write so I've started using them a bit21:27
menn0fwereade: might not use an INDEX21:27
fwereademenn0, ahhhhh21:27
menn0sorry... haven't had my second coffee21:27
menn0I agree .M's are much nicer to write and read21:28
menn0you just have to be a little more careful21:28
fwereademenn0, anyway, I did not know that, can you point me to an example/doc/something?21:28
fwereademenn0, apart from anythinng else this likely means I've been writing my .Ds in a dumb order, because I don;t know what a good one is21:29
menn0fwereade: sorry, ignore what I said about indexes21:30
menn0fwereade: i'm being dumb21:30
menn0fwereade: i'm was misremembering this: http://devblog.me/wtf-mongo (first section)21:30
menn0fwereade: .M's are only really a problem if you're trying to exactly match a embedded document21:30
menn0fwereade: which we rarely/never do21:31
fwereademenn0, ah, ok, cool21:31
menn0fwereade: so using .M's is almost always fine21:31
fwereademenn0, I suppose I also don't know how it handles repeated names, so a conversion from D to M could be fun if they were significant21:31
menn0fwereade: do we do that?21:32
fwereademenn0, not as far as I'm aware, but I do the opposite in the M-handling because it seemed most conveniennt (and should be safe ;))21:33
menn0fwereade: yep, sure21:33
* menn0 slinks away to make another coffee21:33
fwereademenn0, waigani, thumper: by the way I have a question on http://reviews.vapour.ws/r/2078/ that you might collectively know the answer to21:34
fwereadenamely how exactly should cleanupsC interact with env destruction?21:36
menn0fwereade: cleanupsC was removed at runtime? that rings a slight bell, and also sounds like a terrible idea21:36
fwereademenn0, it was pretty clearly accidental21:36
fwereademenn0, foo := multiEnvCollections; foo.Remove(cleaupsC)21:37
fwereademenn0, can't even remember if it was in code or in test21:37
menn0fwereade: that does ring a bell21:37
fwereademenn0, either way I raged momentarily and moved on ;)21:37
* menn0 checks for that code21:37
fwereademenn0, it's somewhere in the red in that review, I'm pretty sure21:38
menn0fwereade: found it. it's in a test.21:38
menn0fwereade: oh... and in implementation21:39
fwereadeha :(21:39
menn0there was a func which returned a copy of the multiEnvCollections but without cleanupsC21:39
menn0/ newEnvAliveColls returns a copy of multiEnvCollections minus cleanupsC.21:40
menn0/ This set is used to check if a txn needs to assert that there is a live21:40
menn0/ environment be inserting docs.21:40
menn0func newEnvAliveColls() set.Strings {21:40
menn0e := set.NewStrings(multiEnvCollections.Values()...)21:40
menn0return e21:40
fwereadethat's the one21:40
fwereaded} and move on, deal with the fallout later :)21:40
menn0it was used to decided whether or not to the assertion for env aliveness should be added to a txn.Op21:41
fwereadeoh wait that one's ok21:41
menn0for cleanupsC it shouldn't I guess21:41
fwereadeyeah I have a similarly vague understanding of maybe why we might want to do that sometimes but I'm very vague21:41
fwereadeI think it's ok to insert into cleanups when an env is dyinng21:42
fwereademenn0, but I don't see why we should preserve cleanups when we nuke env docs21:42
fwereademenn0, that was either happening or I briefly hallucinated it was happening21:42
* fwereade is if nothing else a reliable narrator </straight-face?21:43
menn0fwereade: it seems like what you've done with ignoreInsertRestrictions covers that previous case21:43
menn0fwereade: (although I would consider calling it something like allowInsertWhenEnvNotAlive)21:44
menn0fwereade: i'm not sure about this either. I haven't done much with cleanups. waigani, cherylj and thumper probably know more than me.21:45
menn0fwereade: where do you see code that preserves cleanups when an env is nuked?21:45
* thumper was reading scroll back21:53
thumperI'm not fully caught up yet21:53
waiganimenn0, fwereade: cleanupsC is part of the muliEnvCollections set - so it gets removed along with the others - as the last step of destroying an environment21:53
thumperschool hols, and the girls are wanting to play with my new star realms deck21:54
thumpera little time teaching them the rules may mean many hours of freedom21:54
fwereadethumper, nice :)21:58
fwereadethumper, menn0: it's quite possible all I saw was that it wasn't immediately certain whether the removal code in the test would run before or after any other tests that might depend on its presence or otherwise22:01
thumperwallyworld: we should chat when you have a minute or two22:41
wallyworldthumper: sure, give me 5?22:41
wallyworldthumper: 1:1?22:51
thumperyep, there shortly, just writing something22:52
waiganithumper: your bool problem, is the struct being written to/read from mongo?23:48
waiganithumper: from the mgo docs: "Bools are converted to numeric types as 1 or 0 - Numeric types are converted to bools as true if not 0 or false otherwise"23:49
waiganithumper: maybe ppc stores the bools in a weird way23:49
waiganifwereade: ping23:53

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!