Questions tagged [consistency]

In database systems, a consistent transaction is one that does not violate any integrity constraints during its execution. If a transaction leaves the database in an illegal state, it is aborted and an error is reported.

Consistency is one of the ACID properties that ensures that any changes to values in an instance are consistent with changes to other values in the same instance. A consistency constraint is a predicate on data which serves as a precondition, post-condition, and transformation condition on any transaction.

518 questions
12
votes
4 answers

Cache consistency when using memcached and a rdbms like MySQL

I have taken a database class this semester and we are studying about maintaining cache consistency between the RDBMS and a cache server such as memcached. The consistency issues arise when there are race conditions. For example: Suppose I do a…
12
votes
1 answer

Leader election with: Etcd vs Zookeeper vs Hazelcast

We are choosing the best option for implementing a leader election for our service (written in Java) comprised of multiple (e.g., 3) instances for high availability. Our goal is to have only a single instance active at any given time. Would be great…
12
votes
3 answers

Consistency Level of Cassandra Lightweight transactions

I read about Cassandra 2's lightweight transactions. Is the consistency level of such a write always at QUORUM? Would this mean that even if I have a multi data center setup with 100s of nodes, then quorum of the entire cluster (majority of the…
vishr
  • 985
  • 10
  • 28
11
votes
2 answers

Read-your-own-writes consistency in Cassandra

Read-your-own-writes consistency is great improvement from the so called eventual consistency: if I change my profile picture I don't care if others see the change a minute later, but it looks weird if after a page reload I still see the old…
tillda
  • 18,150
  • 16
  • 51
  • 70
11
votes
1 answer

Consistent validation rules for both Dto and Domain model

I am looking to validate both my Dto's and Domain models using FluentValidation. I already defined a Validator class to validate my Dto as seen below. However if I want to add a Validator for my Domain model as well, a change in one of the…
bbartels
  • 355
  • 3
  • 9
11
votes
2 answers

In game programming, how can I test whether a heuristic used is consistent or not?

I have thought of some heuristics for a big (higher dimensions) tic-tac-toe game. How do I check which of them are actually consistent? What is meant by consistency anyways?
Lazer
  • 90,700
  • 113
  • 281
  • 364
11
votes
2 answers

Can one make Apache Solr index transactionally consistent with DB being indexed?

I am new to Solr. I am trying to make a server that stores structured data in a database, and which can be searched using Solr/Lucene. The server can be is clustered into any number of identical nodes for high availability. It seems that the…
AgilePro
  • 5,588
  • 4
  • 33
  • 56
10
votes
5 answers

how to set cassandra read and write consistency

I can not find the documentation for this. I know there is a consistency command in cqlsh, but there is no distinction between read and write consistency. How would I set different consistency levels for read and write? Furthermore, there is a…
bhomass
  • 3,414
  • 8
  • 45
  • 75
10
votes
7 answers

When is locking necessary

Ok, I know this may sound quite stupid (and I'm afraid it is), but I'm not completely satisfied with the answer I gave myself so I thought it was worth it asking it here. I'm dealing with an exercise about concurrency (in Java) which goes like…
pr0gma
  • 577
  • 3
  • 8
  • 18
9
votes
2 answers

Why were ES5 Object methods not added to Object.prototype?

ES5 added a number of methods to Object, which seem to break the semantic consistency of JavaScript. For instance, prior to this extension, the JavaScript API always revolved around operarting on the object itself; var arrayLength = [].length; var…
Isaac
  • 1,677
  • 3
  • 15
  • 22
9
votes
1 answer

Is serializability same as sequential consistency?

I have found people answering differences between linearizability and searializability, but nowhere have I found people either saying that serializability is same as sequential consistency or it is different from that. Also I have been pounded with…
Prakhar Agrawal
  • 1,002
  • 12
  • 21
9
votes
1 answer

Can the WAIT command provide strong consistency in Redis?

Greetings overflowers, In Redis sentinel/cluster setup, can we use the WAIT command with the total number of slaves to ensure strong consistency across the Redis servers? Why not? Kind regards
geeko
  • 2,649
  • 4
  • 32
  • 59
8
votes
1 answer

Is there a strongly consistent group membership protocol?

I'm looking for an algorithm where groups of connected nodes can be merged together to form a new group (by creating links between nodes from different groups). And where a group can be partitioned to form new partitions. Unlike with consensus…
Peter Jankuliak
  • 3,464
  • 1
  • 29
  • 40
8
votes
1 answer

Example of execution which is sequentially consistent but not quiescently consistent

In the context of correctness of concurrent programs, Sequential consistency is stronger condition than quiescent consistency according to The art of multiprocessor programming by Maurice Herlihy and Nir Shavit(chapter 3) Authors also mention in…
Trojosh
  • 565
  • 1
  • 5
  • 15
8
votes
2 answers

Example of a memory consistency error when using volatile keyword?

From docs: Using volatile variables reduces the risk of memory consistency errors But this means that sometimes volatile variables don't work correct? Strange how it can be used - for my opinion it is very bad code that sometimes work sometimes…
user710818
  • 23,228
  • 58
  • 149
  • 207
1
2
3
34 35