[17:39:46] <elauqsap> hello, I am having a little trouble creating a unique index and I was wondering if anyone could help? I am using robomongo and mgo (the community golang lib) to create the indexes
[18:18:23] <GothAlice> https://jira.mongodb.org/browse/SERVER-25717?focusedCommentId=1374828#comment-1374828 — I was too bored to wait for upstream. ;P
[18:59:17] <r4z> Hello there. I'm using a mongodb-input-plugin on logstash but when I reload elasticsearch with the new conf I get this:
[18:59:24] <r4z> "WARNING: Failed to load native protocols db"
[18:59:52] <r4z> Does anyone knows how to fix it? I'm running ELK on a docker container and I can't be certain if it's a java error or docker error or ELK error...
[20:03:07] <GothAlice> cheeser: Even compiled the first time, though I had the sign wrong when using it (subtracting instead of adding the negative index). T'was silly, but a little coffee fixed that quickly.
[22:12:58] <wgreenberg> hi, is there any way to do an atomic operation that looks like "update document A if document B.foo == bar"?
[22:14:23] <wgreenberg> I'm having an issue w/ race conditions where if I do "find(B).then((B) => if (B.foo == bar) update(A))", then B.foo could be changed between the end of find and when update happens
[22:24:43] <GothAlice> wgreenberg: No, there are no operations cross-document.
[22:25:28] <GothAlice> In order to do that, you're very likely going to need to investigate locking or two-phase commits. https://docs.mongodb.com/manual/tutorial/perform-two-phase-commits/
[22:28:04] <GothAlice> I.e. Select for and lock B against changes to that value (update with query, checking the # updated count to confirm it worked), then update A, then unlock B. Other updates to the B.foo should then be conditional on that lock not being present.
[22:28:49] <GothAlice> This introduces a) a potential delay or retry condition for updates to B.foo, and b) introduces a possibility for hanging locks, but would prevent the A update race condition.