[keycloak-user] Users added since last restart MISSING/GONE after power went out

Marek Posolda mposolda at redhat.com
Mon Sep 7 15:43:07 EDT 2015

On 07/09/15 17:12, Marko Strukelj wrote:
> Thanks for followup.
> Still, I don't see us set WriteConcern.ACKNOWLEDGED anywhere, and it's 
> the only reliable setting to use AFAIK. So unless it's turned on by 
> default (not AFAIK), it's not used. So we should take a closer look at 
> that or someone can point out how completely wrong I am here :)
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 "NORMAL" may imply that it's default, but it's not.

> On Mon, Sep 7, 2015 at 5:05 PM, Dean Peterson <peterson.dean at gmail.com 
> <mailto:peterson.dean at gmail.com>> wrote:
>     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.
>     On Mon, Sep 7, 2015 at 9:55 AM, Marko Strukelj
>     <mstrukel at redhat.com <mailto:mstrukel at redhat.com>> wrote:
>         Sounds like we might not be using WriteConcern.ACKNOWLEDGED.
>         I think there should be
>         this.db.setWriteConcern(WriteConcern.ACKNOWLEDGED);
>         in this line:
>         https://github.com/keycloak/keycloak/blob/master/connections/mongo/src/main/java/org/keycloak/connections/mongo/DefaultMongoConnectionFactoryProvider.java#L92
>         On Mon, Sep 7, 2015 at 2:47 AM, Dean Peterson
>         <peterson.dean at gmail.com <mailto:peterson.dean at gmail.com>> wrote:
>             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.
>             _______________________________________________
>             keycloak-user mailing list
>             keycloak-user at lists.jboss.org
>             <mailto:keycloak-user at lists.jboss.org>
>             https://lists.jboss.org/mailman/listinfo/keycloak-user
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/keycloak-user/attachments/20150907/e22c35c3/attachment-0001.html 

More information about the keycloak-user mailing list