Hi Nicu, By default (with those lines commented), your application will only read data from the local datacenter.
If you get different results when those lines are uncommented it means that the data is not consistent between your datacenters. You'll need to run a full repair to ensure that the data is consistent across both datacenters. For your migration you should join the new DC, run a full repair, then switch your applications over to the new DC (i.e. change withLocalDc()). You can then safely decommission the nodes in your original DC. I would recommend doing the repair one node at a time (sub-range repair would be even better), to allow you to better control the process and limit the potential performance impact on your applications. Justin On Tue, 6 Mar 2018 at 23:18 Marasoiu, Nicu <nicu.maras...@metrosystems.net> wrote: > Hi, > We normally use a single data center, but when switching from one to > another we will temporarily have two. The applications works with the local > DC part of the cluster. > Normally the configuration of the driver would contain (the commented > lines absent): > > .withLoadBalancingPolicy(DCAwareRoundRobinPolicy.builder() > .withLocalDc(localDataCenter) > // .withUsedHostsPerRemoteDc(3) > // .allowRemoteDCsForLocalConsistencyLevel() > .build()) > > However, the queries returned empty. Uncommenting the lines, the queries > returned data. Multiple runs on multiple apps in multiple locations/dcs, > gave data with lines commented/absent. > > All these apps connect to a cassandra cluster within a single data center > currently. We are not clear why the empty results happened. Do you have any > idea what might have caused this? > Having the commented lines uncommented is dangerous in the context of how > the data center migration is planned, since the queries would be able to > reach the remote nodes which are not having all the data initially. > > Please advise, > Thanks, > Nicu Marasoiu > Geschäftsanschrift/Business address: METRO SYSTEMS GmbH, Metro-Straße 12, > 40235 Düsseldorf, Germany > <https://maps.google.com/?q=Metro-Stra%C3%9Fe+12,+40235+D%C3%BCsseldorf,+Germany&entry=gmail&source=g> > Aufsichtsrat/Supervisory Board: Heiko Hutmacher (Vorsitzender/ Chairman) > Geschäftsführung/Management Board: Dr. Dirk Toepfer (Vorsitzender/CEO), > Wim van Herwijnen > Sitz Düsseldorf, Amtsgericht Düsseldorf, HRB 18232/Registered Office > Düsseldorf, Commercial Register of the Düsseldorf Local Court, HRB 18232 > > Betreffend Mails von *@metrosystems.net > Die in dieser E-Mail enthaltenen Nachrichten und Anhänge sind > ausschließlich für den bezeichneten Adressaten bestimmt. Sie können > rechtlich geschützte, vertrauliche Informationen enthalten. Falls Sie nicht > der bezeichnete Empfänger oder zum Empfang dieser E-Mail nicht berechtigt > sind, ist die Verwendung, Vervielfältigung oder Weitergabe der Nachrichten > und Anhänge untersagt. Falls Sie diese E-Mail irrtümlich erhalten haben, > informieren Sie bitte unverzüglich den Absender und vernichten Sie die > E-Mail. > > Regarding mails from *@metrosystems.net > This e-mail message and any attachment are intended exclusively for the > named addressee. They may contain confidential information which may also > be protected by professional secrecy. Unless you are the named addressee > (or authorised to receive for the addressee) you may not copy or use this > message or any attachment or disclose the contents to anyone else. If this > e-mail was sent to you by mistake please notify the sender immediately and > delete this e-mail. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org > For additional commands, e-mail: user-h...@cassandra.apache.org > > -- *Justin Cameron*Senior Software Engineer <https://www.instaclustr.com/> This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA). This email and any attachments may contain confidential and legally privileged information. If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.