Questions tagged [optimistic]

34 questions
67
votes
1 answer

Optimistic locking in MySQL

I can't find any details on optimistic locking in MySQL. I read that starting a transaction keep updates on two entities synced, however - it doesn't stop two users updating the data at the same time causing a conflict. Apparently optimistic locking…
Green Acorn
  • 852
  • 2
  • 10
  • 14
5
votes
3 answers

Why does activerecord optimistic locking work only once per row?

Somehow, I always get these on Fridays. My earlier question was regarding the same problem, but I can now narrow things down a bit: I've been playing with this all day, trying to make sense of it. I have a table with a lock_version colum, specified…
Sniggerfardimungus
  • 11,583
  • 10
  • 52
  • 97
5
votes
2 answers

can ZooKeeper get znode data and znode data version (stat) in one single operation?

I am developing an application that use ZooKeeper as the datastore. For one of the methods in the application, I need to use the optimistic concurrent control. For example, I need to implement a get method which get the znode data, and I use the…
3
votes
2 answers

React: Unique keys and optimistic updating

In my React app I render an array of items returned from the server, using the database id's as keys. items.map(item => ) This works fine, but now I want to do optimistic updating, so I insert new items into the array before…
Simon Christiansen
  • 619
  • 1
  • 6
  • 17
3
votes
1 answer

fluent nhibernate automap version column

Current code in my convention: public void Apply(FluentNHibernate.Conventions.Instances.IVersionInstance instance) { instance.Column("RowVersion"); instance.Not.Nullable(); instance.UnsavedValue("0"); …
RT.
  • 435
  • 2
  • 9
  • 25
2
votes
5 answers

Improving worldwide website performance without using a CDN?

CDNs seem like a tremendously brute-force approach to improving website performance across the world, since they use some thousands of machines close to the end-user to ensure good throughput. Are there any ways of improving performance over long…
David Gardner
  • 6,952
  • 4
  • 35
  • 37
2
votes
1 answer

Business application - pessimistic concurrency using messaging

We are using messaging in a project of ours to implement pessimistic concurrency. This means that if messaging goes down (channel goes down), concurrency goes down. Is this done in other business applications? Do you close the application (log…
Lieven Cardoen
  • 25,140
  • 52
  • 153
  • 244
2
votes
4 answers

optimistic locking user credit management

I have a central database for handling user credit with multiple servers reads and writes to it. The application sits on top of these servers serve user requests by doing the following for each request: 1. check if user has enough credit for the…
user121196
  • 30,032
  • 57
  • 148
  • 198
2
votes
1 answer

Turning off optimistic lock on a field within a component

I am trying to turn off optimistic locking for a particular field within a component. Turning off at the component level (which applies for all fields in component) works. But not for a particular field with in the component. I am using hibernate…
user3221430
  • 71
  • 1
  • 6
2
votes
1 answer

wierd optimistic lock exception

I have been struggling with this problem since long and finally decided to share it with you as my last option.Please help me out.I am a working on a project involving JSF, EcllipseLink JPA, Glassfish 3.1.2.2 open source edition and ms sql server…
2
votes
0 answers

Optimistic Backbone application

I just wanted to know if there are any articles, discussions and general advice on building an optimistic application? As of 0.9 Backbone changed its models to be optimistic by default. Now if I am saving/updating a model, do I need to wait for a…
TYRONEMICHAEL
  • 4,174
  • 4
  • 30
  • 47
1
vote
0 answers

Visual replication issue when moving tasks between columns using Angular and Firebase

I'm facing a visual replication issue when implementing drag and drop functionality to move tasks between columns in an Angular application that uses Firebase as the database. When I drag a task from one column to another, the task is correctly…
rphLnrd
  • 11
  • 1
1
vote
2 answers

Type error when using onMutate in react query (Optimistic Updates)

export const usePostApi = () => useMutation(['key'], (data: FormData) => api.postFilesImages({ requestBody: data })); Query Definition const { mutateAsync } = usePostApi(); const {data} = await mutateAsync(formData, { onMutate: () =>…
numnu
  • 21
  • 3
1
vote
0 answers

prisma:Optimistic Concurrency Control Use UpdateMany Has Problems

I have a problem. I don't know if I use it wrong or there is a problem Under concurrency, optimistic locks implemented with updateMany will have overwrite writes Thank u for your help~ address Simple Test Optimistic Concurrency Control pattern case…
Jack
  • 11
  • 2
1
vote
1 answer

Optimistic synchronization of replicated objects in javascript

I'm programming a browser application (html5+websockets+css3+js preferred) that enables users to concurrently access (read, write) attributes of the same object. To create a real-time experience I'd like to use optimistic synchronization. I read…
brainfrozen
  • 253
  • 1
  • 5
  • 13
1
2 3