Deleting many rows without locking them

In PostgreSQL I have a query like the following which will delete 250k rows from a 1m row table: DELETE FROM table WHERE key = 'needle'; The query takes over an hour to execute and during that...

Git SVN error: a Git process crashed in the repository earlier

I was just trying to commit changes to the Git master. From what I have read, it seems that the idea is to delete the lock file. The message says: make sure no other Git processes are running and...

SQLite keeps the database locked even after the connection is closed

I'm using System.Data.SQLite provider in an ASP.NET application (framework 4.0). The issue I'm running into is that when I INSERT something in a table in the SQLite database, the database gets...

How to make the Android device hold a TCP connection to Internet without wake lock?

I want my application to be connected to server though the mobile connection, yet allowing the device to go into sleep mode. I expect it to wake up when IP packates arrives. How can this be done?...

Getting [SQLITE_BUSY] database file is locked with select statements

If I run multiple threads against my web app I get: java.sql.SQLException: [SQLITE_BUSY] The database file is locked (database is locked) at org.sqlite.DB.newSQLException(DB.java:383) at...

Got "filename.settings cannot be locked because it is read-only" error running iReport 4.0.2 at Ubuntu

I just installed iReport yesterday and it was working fine. But when I try to run it today it is not working properly. Here is what I have done; Downloaded iReport-4.0.2 Extracted it in my...

Excel Macro error: "Error 1004: application defied or object defined error"

Thanks for the help and support. I am very new to excel and this might be a basic question. I am trying to run a macro to export an access query result to an excel. I am planning to automate the...

What is the best way to serialize/deserialize Dart's new enum with JSON?

I'd like to make use of Dart's new (experimental) enum feature instead of using stacks of static const Strings, but what's the best way to serialize/deserialize enum variables using JSON? I've...

Asynchronous locking based on a key

I'm attempting to figure out an issue that has been raised with my ImageProcessor library here where I am getting intermittent file access errors when adding items to the...

Can std::atomic memory barriers be used to transfer non-atomic data between threads?

Is the following code standards compliant? (or can it be made compliant without making x atomic or volatile?) This is similar to an earlier question, however I would like a citation to the...

How to do polymorphic IO from either a File or stdin in Rust?

I'm trying to implement a "polymorphic" Input enum which hides whether we're reading from a file or from a stdin. More concretely, I'm trying build an enum that will have a lines method that will...

Calling ToList() on ConcurrentDictionary<TKey, TValue> while adding items

I've run into an interesting issue. Knowing that the ConcurrentDictionary<TKey, TValue> is safely enumerable while being modified, with the (in my case) unwanted side-effect of iterating over...

How to lock multiple stages of declarative Jenkins pipeline?

I want to run multiple stages inside a lock within a declarative Jenkins pipeline: pipeline { agent any stages { lock(resource: 'myResource') { stage('Stage 1') { ...

Error of "error: could not lock config file .git/config: Permission denied" occurs while installing Carthage

I want to install carthage on my Mac OS using brew install carthage command. However, I get the following error: touch: /usr/local/Homebrew/.git/FETCH_HEAD: Permission denied touch:...

Is it possible to use Firebase to implement a distributed mutex?

I was thinking of using a transaction like so to implement a kind of distributed lock: const lockId = 'myLock'; const lockRef =...

Mutex in JavaScript - does this look like a correct implementation?

Not an entirely serious question, more of a shower thought: JavaScript's await keyword should allow for something that feels an awful lot like a mutex in your average "concurrent...

How to unzip a zip file in flutter using native code for Android and iOS?

I tried using the Archive 2.0.10 package in Flutter to unzip my zip archive. It works, but the time to unzip is very long compared to the native function of Android and iOS (I say that because I...

Visual Studio Code updating woes

I've been having trouble when updating Visual Studio Code. Whenever I try to update there are files in the resource directory that are locked and block the installation. The installation is not...

Hyperledger Fabric: Peer Node Rollback

I am following Hyperledger V 1.4 documsation to roll back the channel mychannel to block number 150 using this following command: peer node rollback -c mychannel -b 150 If I run this inside...

Error locking state: Error acquiring the state lock: state blob is already locked

I am getting this error when I try to do any operation: Error locking state: Error acquiring the state lock: state blob is already locked How can I list the people currently have a lock and how...

Xcode log message "flock failed to lock list file"

I am getting this message logged when running a freshly created macOS app in Xcode (Apple Silicon / Xcode 12). flock failed to lock list file...

MSB4044: The "KillProcess" task was not given a value for the required parameter "ImagePath"

Long story short, I was able to build a bitbucket .NET/MVC/Angular project successfully on windows 2019 azure hosted agent, but I am unable to make it build successfully on ubuntu agent. The...

Why a select query trigger optimistic locking error in JPA hibernate?

There is one ObjectOptimisticLockingFailureException thrown. I check the log and find this exception is triggered by a select query. This is werid. Here is the exception stack trace. at...

How does copyout() in xv6 avoid race condition in the page table?

// Copy from kernel to user. // Copy len bytes from src to virtual address dstva in a given page table. // Return 0 on success, -1 on error. int copyout(pagetable_t pagetable, uint64 dstva, char...

Microsoft Access DBEngine.OpenDatabase() breaks for Network-Paths - Error 3050

We have an Access Database-Solution with Frontend and Backend Database running for years. Now within the last two days problems occurred. E.g. Set db =...

Laravel Valet - deprecated dependencies in lock file

On running composer global require laravel/valet, illuminate/contracts and illuminate/container are locked to v5.4.36: - Locking illuminate/container (v5.4.36) - Locking illuminate/contracts...

Are memory orders for each atomic correct?

I have a ring buffer that looks like: template<class T> class RingBuffer { public: bool Publish(); bool Consume(T& value); bool IsEmpty(std::size_t head, std::size_t tail); bool...

Spring Batch Deadlock - Could not increment identity; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException

We are in the process of moving to Azure SQL Server from Oracle DB for our Spring Batch application. I am getting the following error while trying to execute two different jobs at the same time...