This issue can't be edited

Because it belongs to an archived project. Jira admins can restore projects from the archive.

Support for MongoDB Replica Set in OGM

Description

The use of replica sets is a must when using MongoDB. Currently I am only able to set one port for mongodb. Hibernate OGM should allow me to add any/all HOST and PORT numbers that belong to a MongoDB replica set.

Environment

All Environments

Activity

Show:

Gunnar Morling May 12, 2015 at 9:45 AM

Hey , I see the issue is assigned to you; Did you ever get a chance to look into this?

Emmanuel Bernard March 10, 2015 at 1:04 PM

Right, we would need to also offer replicaset write/read concerns as option and the according calls int he dialect.

Emmanuel Bernard March 10, 2015 at 1:01 PM

I think it would be simpler to support the fairly common syntax of hostface with tongueort

hibernate.ogm.datastore.host ip1:123, ip2:456

This is less fragile that the hosts + ports in two different properties.

Speaking of, I think it would be even better if we offer a hibernate.ogm.datastore.url mongodb://ip1:123,ip2:456.
This avoids the misname "host", is more flexible and I think will be useful to other datastores.

Hardy Ferentschik March 10, 2015 at 10:59 AM

But having a configuration value for persistence.xml would surely would be a good thing as well.

When it comes to configuration values, could you not just comma separate hosts and ports in hibernate.ogm.datastore.host resp. hibernate.ogm.datastore.port. This is also how the driver url looks like - see this test. In our case we have two properties, but I think one could just say, if there is a single host, but multiple ports, assume all instances are on the same host. Similar for multiple hosts. If there are multiple hosts and ports there must be a match in argument length.

Also, being able to specify a replica set is one thing, but I guess you also need to then be able to configure some of the different read/write semantics - http://docs.mongodb.org/ecosystem/drivers/java-replica-set-semantics/, or not?

Emmanuel Bernard February 19, 2015 at 2:11 PM

hey guys, is there any news on that front?

Fixed

Details

Assignee

Reporter

Participants

Ajay Bhat
Dean Peterson
Emmanuel Bernard
Gunnar Morling
Hardy Ferentschik

Components

Fix versions

Priority

Created December 1, 2014 at 3:33 PM
Updated May 19, 2015 at 1:39 PM
Resolved May 18, 2015 at 4:15 PM

Flag notifications