Re: Guaranteed order for syncing Records

2017-07-06 Thread Jeff Jirsa


On 2017-07-05 23:14 (-0700), suraj pasuparthy  
wrote: 
> thanks Pranay,
> But is the order maintained across tables?
> As in the client in DC1 first writes record A in table A and then
> immediately writes Record B in Table B,
> So will the order be maintained, where in Table A gets synced first and
> then Table B?
> 

Cassandra doesn't use traditional sync mechanisms like you may be assuming 
(there is no binary transaction log that is replayed in order on each server). 
The order of mutations arriving on the replicas is NOT guaranteed at this time.

If you need to guarantee the above behavior, you may be able to accomplish it 
with either sufficiently high consistency levels (block the acknowledgement of 
the write until N replicas have responded, including the remote datacenters) at 
the cost of query latency.
 

-
To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org
For additional commands, e-mail: user-h...@cassandra.apache.org



Re: Guaranteed order for syncing Records

2017-07-06 Thread Jonathan Haddad
Cassandra uses the writetime to resolve the conflict. Highest time stamp
wins. There's no guarantee on the order the mutations arrive in.
On Thu, Jul 6, 2017 at 7:14 AM suraj pasuparthy 
wrote:

> thanks Pranay,
> But is the order maintained across tables?
> As in the client in DC1 first writes record A in table A and then
> immediately writes Record B in Table B,
> So will the order be maintained, where in Table A gets synced first and
> then Table B?
>
> Thanks again
> -Suraj
>
> On Wed, Jul 5, 2017 at 11:08 PM, Pranay akula 
> wrote:
>
>> Hello suraj,
>>
>> Nope there will no out sync between same tables in different Datacenters,
>> so Record A in Table A in Datacenter 1 will also be in Table A in
>> Datacenter 2, just make sure there is no communication issues between
>> Datacenters.
>>
>>
>> Thanks
>> Pranay.
>>
>> On Thu, Jul 6, 2017 at 2:01 AM, suraj pasuparthy <
>> suraj.pasupar...@gmail.com> wrote:
>>
>>> Hello Experts,
>>> I had a question
>>>
>>> We have a multi DC cluster for cassandra and wanted to confirm one
>>> behavior.
>>> Are the records order maintained while syncing to the backup datacenter?
>>> What i mean is, if say, Record A is written to a Table A and Record B is
>>> written to Table B on Datacenter 1, Does cassandra ensure that first Record
>>> A is synced to Table A in Datacenter 2 and then the Record B syncs to table
>>> B ?
>>>
>>> Is there a possibility of "out of order " syncs between datacenters ?
>>>
>>> --
>>> Suraj Pasuparthy
>>>
>>>
>>
>
>
> --
> Suraj Pasuparthy
>
> cisco systems
> Software Engineer
> San Jose CA
>


Re: Guaranteed order for syncing Records

2017-07-06 Thread suraj pasuparthy
thanks Pranay,
But is the order maintained across tables?
As in the client in DC1 first writes record A in table A and then
immediately writes Record B in Table B,
So will the order be maintained, where in Table A gets synced first and
then Table B?

Thanks again
-Suraj

On Wed, Jul 5, 2017 at 11:08 PM, Pranay akula 
wrote:

> Hello suraj,
>
> Nope there will no out sync between same tables in different Datacenters,
> so Record A in Table A in Datacenter 1 will also be in Table A in
> Datacenter 2, just make sure there is no communication issues between
> Datacenters.
>
>
> Thanks
> Pranay.
>
> On Thu, Jul 6, 2017 at 2:01 AM, suraj pasuparthy <
> suraj.pasupar...@gmail.com> wrote:
>
>> Hello Experts,
>> I had a question
>>
>> We have a multi DC cluster for cassandra and wanted to confirm one
>> behavior.
>> Are the records order maintained while syncing to the backup datacenter?
>> What i mean is, if say, Record A is written to a Table A and Record B is
>> written to Table B on Datacenter 1, Does cassandra ensure that first Record
>> A is synced to Table A in Datacenter 2 and then the Record B syncs to table
>> B ?
>>
>> Is there a possibility of "out of order " syncs between datacenters ?
>>
>> --
>> Suraj Pasuparthy
>>
>>
>


-- 
Suraj Pasuparthy

cisco systems
Software Engineer
San Jose CA


Re: Guaranteed order for syncing Records

2017-07-06 Thread Pranay akula
Hello suraj,

Nope there will no out sync between same tables in different Datacenters,
so Record A in Table A in Datacenter 1 will also be in Table A in
Datacenter 2, just make sure there is no communication issues between
Datacenters.


Thanks
Pranay.

On Thu, Jul 6, 2017 at 2:01 AM, suraj pasuparthy  wrote:

> Hello Experts,
> I had a question
>
> We have a multi DC cluster for cassandra and wanted to confirm one
> behavior.
> Are the records order maintained while syncing to the backup datacenter?
> What i mean is, if say, Record A is written to a Table A and Record B is
> written to Table B on Datacenter 1, Does cassandra ensure that first Record
> A is synced to Table A in Datacenter 2 and then the Record B syncs to table
> B ?
>
> Is there a possibility of "out of order " syncs between datacenters ?
>
> --
> Suraj Pasuparthy
>
>


Guaranteed order for syncing Records

2017-07-06 Thread suraj pasuparthy
Hello Experts,
I had a question

We have a multi DC cluster for cassandra and wanted to confirm one behavior.
Are the records order maintained while syncing to the backup datacenter?
What i mean is, if say, Record A is written to a Table A and Record B is
written to Table B on Datacenter 1, Does cassandra ensure that first Record
A is synced to Table A in Datacenter 2 and then the Record B syncs to table
B ?

Is there a possibility of "out of order " syncs between datacenters ?

-- 
Suraj Pasuparthy