<div dir="ltr">Thanks Marek for explaining.<div><br></div><div>This setting defaulted to something else not so long ago, and it caused many problems - like intermittent test failures due to race conditions ... </div><div><br></div><div>Good to see WriteConcern.ACKNOWLEDGED is now the default.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 7, 2015 at 9:43 PM, Marek Posolda <span dir="ltr">&lt;<a href="mailto:mposolda@redhat.com" target="_blank">mposolda@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><span class="">
    <div>On 07/09/15 17:12, Marko Strukelj
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Thanks for followup. 
        <div><br>
        </div>
        <div>Still, I don&#39;t see us set WriteConcern.ACKNOWLEDGED
          anywhere, and it&#39;s the only reliable setting to use AFAIK. So
          unless it&#39;s turned on by default (not AFAIK), it&#39;s not used.
          So we should take a closer look at that or someone can point
          out how completely wrong I am here :)</div>
      </div>
    </blockquote></span>
    Yeah, sorry but it looks I can point that :) I am seeing in
    com.mongodb.MongoClientOptions.Builder that ACKNOWLEDGED is the
    default settings and just verified with debugger that it is really
    the case. I agree that it is bit misleading as WriteConcern.NORMAL
    is same as UNACKNOWLEDGED and &quot;NORMAL&quot; may imply that it&#39;s default,
    but it&#39;s not.<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Marek
    </font></span><span class=""><blockquote type="cite">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, Sep 7, 2015 at 5:05 PM, Dean
          Peterson <span dir="ltr">&lt;<a href="mailto:peterson.dean@gmail.com" target="_blank">peterson.dean@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div dir="ltr">I replied to this list.  I figured it out. 
              It was my stupid mistake.  I use Docker and I automated
              restoring data from a json file the last time I upgraded
              keycloak.  I never took that line out; it had been a long
              time since I restarted and when I finally did, that line
              was still in the Dockerfile.  I restored back to the old
              user data by accident.</div>
            <div>
              <div>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On Mon, Sep 7, 2015 at 9:55
                    AM, Marko Strukelj <span dir="ltr">&lt;<a href="mailto:mstrukel@redhat.com" target="_blank"></a><a href="mailto:mstrukel@redhat.com" target="_blank">mstrukel@redhat.com</a>&gt;</span>
                    wrote:<br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div dir="ltr">Sounds like we might not be
                        using WriteConcern.ACKNOWLEDGED.
                        <div><br>
                        </div>
                        <div>I think there should be</div>
                        <div><br>
                        </div>
                        <div>this.db.setWriteConcern(WriteConcern.ACKNOWLEDGED);<br>
                        </div>
                        <div><br>
                        </div>
                        <div>in this line: <a href="https://github.com/keycloak/keycloak/blob/master/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java#L92" target="_blank">https://github.com/keycloak/keycloak/blob/master/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java#L92</a></div>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote"><span>On Mon, Sep 7,
                            2015 at 2:47 AM, Dean Peterson <span dir="ltr">&lt;<a href="mailto:peterson.dean@gmail.com" target="_blank">peterson.dean@gmail.com</a>&gt;</span>
                            wrote:<br>
                          </span>
                          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>
                              <div dir="ltr">There may be a serious bug
                                in Keycloak.  I have a number of users
                                that have been completely wiped from the
                                Keycloak mongodb database after a power
                                outage.  Luckily I retain their
                                information in a separate mongodb
                                database with other information or they
                                would be gone forever.  When does
                                Keycloak commit user data?  The users
                                that are missing are users that
                                registered after the last system restart
                                but before the system went down after a
                                power outage.  </div>
                              <br>
                            </span>_______________________________________________<br>
                            keycloak-user mailing list<br>
                            <a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a><br>
                            <a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a><br>
                          </blockquote>
                        </div>
                        <br>
                      </div>
                    </blockquote>
                  </div>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
keycloak-user mailing list
<a href="mailto:keycloak-user@lists.jboss.org" target="_blank">keycloak-user@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user" target="_blank">https://lists.jboss.org/mailman/listinfo/keycloak-user</a></pre>
    </blockquote>
    <br>
  </span></div>

</blockquote></div><br></div></div>