IRC log of #zodb for Monday, 2013-06-03

*** srichter has joined #zodb02:55
*** srichter has quit IRC03:02
*** srichter_ has joined #zodb03:04
*** JaRoel has quit IRC09:32
*** agroszer has joined #zodb10:04
*** JaRoel|4d has joined #zodb10:43
*** JaRoel has joined #zodb13:07
*** JaRoel|4d has quit IRC13:13
*** agroszer has quit IRC13:47
*** JaRoel has quit IRC13:49
*** JaRoel|4d has joined #zodb13:49
*** agroszer has joined #zodb13:57
*** agroszer has quit IRC14:29
*** srichter_ has quit IRC15:19
*** agroszer has joined #zodb15:20
*** fdrake has joined #zodb16:04
*** agroszer has quit IRC16:46
J1m_LjL, re indexing, if your needs are simple, it's usually best to use BTrees mapping from your index keys to sets of matching objects.16:49
J1m_If you want something more full featured, see zope.catalog and the many derivative projects.16:50
*** J1m_ is now known as J1m16:50
*** nueces has joined #zodb17:51
*** nueces has quit IRC18:46
*** nueces has joined #zodb19:02
*** nueces has quit IRC19:03
*** nueces has joined #zodb19:04
*** JaRoel|4d has quit IRC19:24
*** nueces_ has joined #zodb19:47
*** JaRoel|4d has joined #zodb19:49
*** nueces_ has quit IRC19:52
*** nueces has quit IRC19:52
*** JaRoel|4d has quit IRC19:53
*** nueces has joined #zodb19:53
*** JaRoel|4d has joined #zodb19:54
*** vangheem has joined #zodb20:05
vangheemJ1m: Hi, did you notice: https://bitbucket.org/zc/zc.zrs/issue/2/242-egg-installation-fails-with-import ? I have a pull request that fixes it.20:06
J1mNope.  I'll look at it. Thanks.20:09
J1mMerged.20:12
vangheemthanks20:13
vangheemJ1m: a release would be helpful too. no worries if you don't have time though, I'm just poking20:14
J1mYeah, can't do that right now, but I'll try to get to it soon.20:15
vangheemthanks20:15
*** nueces has quit IRC20:21
vangheemJ1m: I'd also like to look into being able to do master-master replication to zrs some day. Is there anything obvious blocking this from being possible or was it never been looked into?20:25
J1mNot sure what you mean by master-master.20:26
vangheemj1m: two separate write zeo servers that sync together20:27
*** JaRoel|4d has quit IRC20:27
vangheemJ1m: so multiple primaries for the terminology zrs is using20:28
J1mThat's what I wanted to do years ago, but the author of ZRS 1 decided to do primary/secondary.20:28
*** nueces has joined #zodb20:28
J1mA multiple-master scheme, which would be based on voting, would have little (likely nothing) in common with ZRS 2.20:29
*** JaRoel|4d has joined #zodb20:30
J1mIt's not clear that it would be a win.  The coordination (voting) overhead could swamp the benefits of multiple masters. Still, it might be worth the effort if someone had the time.20:30
J1mOf greater interest in the short to medium term would be some sort fo protocol for automatically electing new masters if a master fails.  This is, for example, what ZooKeeper does.20:31
vangheemyes, that'd work too20:32
vangheemhowever, flipping a secondary over to a primary can be annoying20:32
J1mA much easier performance win, for some definition of easy, would be to rewrite ZEO servers in a better server language.20:32
vangheembecause you have to change config, restart20:32
J1mRight, but in practice, this doesn't happen often.20:33
vangheemheh, need to find someone who know erlang and wants to rewrite zeo :)20:33
J1mI'm dating scala atm.20:34
J1mSee https://bitbucket.org/zc/zc.zrs/wiki/Project%20Ideas20:34
J1mThe first idea is an incremental step that automates the switchover process.20:34
J1mThe biggest issue for us in switching is the temporary loss of service.20:35
vangheemyes, this is an easier idea20:35
J1mThis means planned failovers tend to be in off hours (fortunately for us, we have those).20:36
vangheembut, as you say, it only hits the planned failover use case20:36
J1mI'd like add an option to ZEO clients to be able to block (for a few seconds) rather than error on disconnection.20:37
J1mAn unplanned failover is a traumatic event no matter what you do, because you may have a loss of data.20:38
J1mI'm still not comfortable doing that automatically.20:39
vangheemyah, I suppose20:39
J1mA step toward making that safer would be to record tids somewhere, like ZooKeeper, as they are committed.20:40
vangheemnot needing to restart in order to change primary addresses would help a lot to make this easier20:40
J1mYes, but even on out largest databases, restarts only take a few seconds.  Now that indexes are written and read much fater than they once were.20:41
J1m(Although our largest database is on an ssd :)20:41
vangheemright, I guess it's really the applications that are the problem20:41
J1mBut you aren't restarting the app.20:41
J1mOnly the ZEO server.20:42
vangheemat least in my experience, if I restart a zeo, the client will lose connection20:42
vangheemI never restart a zeo while the client is turned on20:42
vangheemand large plone sites can take a minute to start up...20:42
J1mThe client connection code is a disaster.20:43
J1mI can barely get it in my head and can only hold it there a matter of seconds.20:43
J1mWay overcomplicated and brittle.20:43
J1mHaving said that, we rarely have a problem with clients reconnecting.20:44
J1mWhen we do database maintenance, and restart the servers, we'll have >100 clients that reconnect with no problem.20:44
J1moccasionally, one or 2 will fail to reconnect.20:45
J1mSomeone recently submitted a patch to fix some problems in the client connection logic.20:45
J1mThat logic really wants to be rewritten to be asynchronous, rather than bing threaded, as it is now.20:46
vangheemI'll have to try it again then, maybe I don't need to be as afraid as I am to do it20:46
J1mOne thing we found is that the read-only-secondary mechanism isn't very reliable, or for that matter, the logic for recovering from gettinga read-only server when you want to read-write server.20:48
J1mFor that reason, we run primaries and secondaries on different ports.20:48
*** nueces has quit IRC20:48
J1mTo automate role swaps, we'll need to fix this.20:49
J1mTo clarify, the logic in ZEO for handling read-only secondaries when a read-write secondary is needed.20:52
J1mUsing secondaries as read-only servers works just fine.20:52
vangheemyes20:54
vangheemso annoying thing… read-only clients throw errors on trying to write. It'd be nice to be able to silence those errors20:54
vangheemright now I just abort every transaction20:54
vangheemsome apps try to write on read...20:54
J1mYour approach is interesting if you *know* that missing the writes is harmless.20:55
J1mIn general, hiding these sorts of errors seems like a bad idea. Better to fix the apps.20:56
vangheemoften it's just things like scales that are generated on demand21:01
vangheemokay to not save to the database since they'll still be cached21:02
*** davisagli has quit IRC23:17
*** vangheem has quit IRC23:29

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