Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [locking]

Locking allows different types of resources to be used exclusively by one process at a time.

locking
0 votes
0 answers
17 views

Can't use ACCESS EXCLUSIVE MODE for locking table in Spring boot app

On my project i use QueryDSL for access to Postgres db. Recently i got task to set lock on table so only one instance of app can use table (locks on rows can't be used). I tries to use in code ACCESS ...
Ar.Kuzmin's user avatar
0 votes
0 answers
9 views

Why can't I get distributed lock from redisson client sometimes

I'm using a listener to handle spring-session key expiration event. I have a Redis cluster with only 3 master nodes (no slaves) and a Tomcat cluster with 3 nodes. I was considering that the session ...
Lawrence's user avatar
  • 140
0 votes
1 answer
53 views

Do I need a Transaction here or am I fine with just a Lock?

I have this table: create_table :api_usages do |t| t.references :api_key, null: false, foreign_key: true t.date :billing_date, null: false t.integer :request_count, null: false t.timestamps ...
Ben G's user avatar
  • 26.5k
-2 votes
1 answer
55 views

In SQL, is it possible/safe to implement optimistic locking using a boolean instead of version increments?

I am trying to implement a simple mutex lock in SQL. My tentative solution is the following: query = 'UPDATE my_table SET lock_field = 1 WHERE lock_field = 0 AND mutex_id = 17' if (query.execute() == ...
BlueBiscuit's user avatar
-1 votes
1 answer
29 views

Refresh Solr stock after ordering

We have a business requirement that forced us to do a live refresh of stocks in Solr every after a user orders. What I did was created a new action in our orderProcess.xml that will put a lock, run ...
iamrooovic's user avatar
0 votes
0 answers
38 views

Why is Linux mutex_waiter struct created on the kernel stack?

I examined the Linux mutex implementation code, where if the lock is held by others, the lock function creates a mutex_waiter struct on the stack (as a local variable) and adds this struct as a node ...
Yijue Xu's user avatar
0 votes
0 answers
35 views

Check if ASCII/ text file is locked or being written [duplicate]

The title is pretty self-explanatory. The commonly used method: protected virtual bool IsFileLocked(FileInfo file) { try { using(FileStream stream = file.Open(FileMode.Open, FileAccess....
federico's user avatar
-1 votes
0 answers
46 views

c# lock in singleton causing high CPU usage when IIS recycle application pool?

I have this singleton class, CacheManager that handles and store a list of Store<TKey, TValue>. By getting a specific Store via CacheManager.Instance.GetStore, i can then read or store values. ...
Bruschi Filippo's user avatar
0 votes
0 answers
62 views

Will using a transaction on my SQL Server prevent another host from being able to read rows in the table? [duplicate]

Suppose I have a table that is constantly being updated with tasks to be processed. One column in this table is Status, and when a task is first entered into the table, Status = 'submitted'. When a ...
Josh's user avatar
  • 1
-1 votes
1 answer
52 views

GO Cond - fmt.Println after wg.Done ended up dead lock

Unable to understand this dead lock situation in golang, i have below to go code with pub and sub pattern package main import ( "fmt" "sync" ) func main() { cond := ...
Hari's user avatar
  • 1,593
0 votes
1 answer
34 views

DynamoDB Transaction Optimistic Locking

I have a serverless application using APIGateway, Lambda, and DynamoDB with NodeJS and typescript. I have a handful of situations were multiple clients could attempt to modify certain resources ...
Phil's user avatar
  • 63
-1 votes
0 answers
24 views

Is this locking mechanism foolproof?

I want to create a locking mechanism for my web application with mongoose, but I am not sure wether it is 100% foolproof, which would be important. Thats the locking mechanism, it sets the id inside ...
onii chan's user avatar
0 votes
0 answers
19 views

Distributed lock - Two nodes believing to have a token after process pause

In this article, Martin Kleppmann claims that using fencing tokens solves the issue of process pauses and uses the following diagram to demonstrate it: Here we can see that the write of client 1 gets ...
Tlokuus's user avatar
  • 327
1 vote
0 answers
84 views

How to update/write DuckDB in production environment

Initial situation: I use a DuckDB (file-based) as a data source for a Streamlit dashboard. The DuckDB is initially filled with data from a legacy database and should then receive new records from the ...
netblognet's user avatar
  • 2,006
0 votes
1 answer
35 views

Powershell script fails due to locked files

I have the following PowerShell script, which I am using to move all files in a directory containing a specific string within: gci -Path 'C:\Users\LG\Desktop\3039u\*.txt' -r|sls -Pattern '(?-i)^Engine:...
JLosc's user avatar
  • 5

15 30 50 per page
1
2 3 4 5
594