G-Node / G-Node/nix

Lock bit when opening file for writing

Open
#625 4 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
72
Forks
36
PR merge metrics
No merged PRs in 30d

Description

It might be a nice idea to have a lock attribute set on the file when it is open for writing, to protect against multiple instances writing to a file simultaneously.

This would protect against accidentally running two processes that write to the same file, which can cause corruption (this just happened), or even against two different people writing to the same file on a remote machine (on a common network share, for instance).

What do you think?

Contributor guide

Open the contributing guide

Research direction

The issue does not name any files, tests, or entry points. First clarify the locking semantics, scope, and behavior for concurrent writers or remote shares, then locate the file-opening and write paths. Done requires an agreed design and tests demonstrating protection against simultaneous writes.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.