Questions tagged [data-consistency]

126 questions
5
votes
2 answers

How to avoid sending 2 duplicate POST requests to a webservice

I send a POST request to create an object. That object is created successfully on the server, but I cannot receive the response (dropped somewhere), so I try to send the POST request again (and again). The result is there are many duplicated objects…
N. Q. P
  • 395
  • 5
  • 15
5
votes
4 answers

MySQL: How to lock tables and start a transaction?

TL;DR - MySQL doesn't let you lock a table and use a transaction at the same time. Is there any way around this? I have a MySQL table I am using to cache some data from a (slow) external system. The data is used to display web pages (written in…
Malvineous
  • 25,144
  • 16
  • 116
  • 151
4
votes
2 answers

Typescript union type consistency

Having a Typescript variable of union type A type A = { b: true x: number } | { b: false x: string } declare const v: A i can properly assign property x to correct type, by checking for property b value type with an if…
aleclofabbro
  • 1,635
  • 1
  • 18
  • 35
4
votes
1 answer

Does the SQL Server automatic index tuning feature drop unique indexes?

I was wondering if the SQL Server 2017 (or SQL Azure) automatic index tuning feature would drop any unique index on a table, since that would be very bad for data consistency.
4
votes
2 answers

Cassandra Consistency Level and Replication Factor

I'm new to Cassandra. Let's assume I have 3 nodes and Replication Factor(RF) of the keyspace is 3. Can I safely assume that if 2/3 nodes are down, I still get the complete data for a query irrespective of the Consistency level? Keeping 2/3 nodes…
Guda uma shanker
  • 183
  • 1
  • 13
4
votes
1 answer

Lua (LuaJit) and object lifetime in C

I use LuaJit for extending a plain C application (using the Lua C API). The host application does manage memory for a lot of objects that I have written wrappers for in Lua. Now I would like to be able to delete objects from within the lua function,…
wirrbel
  • 3,173
  • 3
  • 26
  • 49
3
votes
1 answer

Managing data-store concurrency as microservices scale

I am still trying to find my way around micro-services. I have a fundamental question. In an enterprise scenario, micro-services would probably have to write to a persistent data-store - be it a RDBMS or some kind of NoSQL. In most cases the …
TechiRik
  • 1,893
  • 6
  • 27
  • 37
3
votes
3 answers

How does thread interference actually happens in the `Counter` example class?

I'm trying to learn the concept of thread interference and have encountered the following example in Java Tutorial Oracle: class Counter { private int c = 0; public void increment() { c++; } public void decrement() { …
Thor
  • 9,638
  • 15
  • 62
  • 137
2
votes
2 answers

How to avoid thread interference while updating database in multithreading

I have a java class ,which has two methods .These methods will be called one after the other. These methods are making rest calls to different services. After getting data from rest call ,i'm updating multiple tables and some of the tables will be…
2
votes
1 answer

How to ensure data consistency between local and remote database when providing smartphone and web app

I am developing a flutter app that should also be able to run in offline mode. Because I am using flutter I want to also offer the use of the web version of my application. The application I want to build is data reliant therefore to make it work…
2
votes
2 answers

What should be the flow when performing related async tasks?

Lets say i have a method updateRecord(), and this method performs some async requests inside of it, and some of this requests are more important than others since they impact hardware, and some are, although necessary, only affecting a record in a…
2
votes
1 answer

What is the accurate way of removing outliers from a set of data and make the data consistent using javascript?

Let's say we have the following set of data. 2.33, 2.19, 4.7, 2.69, 2.8, 2.12, 3.01, 2.5, 1.98, 2.34 How do I pick the consistent data from the above sample by eliminating the outliers using JavaScript or any other mathematical method which can be…
Poojitha
  • 21
  • 4
2
votes
1 answer

Inconsistent Elassandra cluster state after node restart - less data on one node

I have migrated my existing data in 4 nodes Cassandra (with RF=3) to Elassandra and after putting my mappings whole data got indexed into Elassandra. After the completion of indexing, all nodes show a consistent result in /_cat/indices?v API. But as…
2
votes
1 answer

using delta lake tables as lookups on another changing delta table

I have a scenario where I'm using one delta table as a lookup table for another delta table. if during the lookup, a lookup value gets added to the underlying table during the operation, will it been picked up in my lookup join?
femi
  • 974
  • 2
  • 13
  • 44
2
votes
1 answer

RavenDB Consistency - WaitForIndexesAfterSaveChanges() / WaitForNonStaleResultsAsOfNow

I am using RavenDB 3.5. I know that querying entities is not acid but loading per ID is. Apparently writing to DB is also acid. So far so good. Now a question: I've found some code: session.Advanced.WaitForIndexesAfterSaveChanges(); …
yBother
  • 648
  • 6
  • 25
1
2
3
8 9