fsspec / fsspec/filesystem_spec
Add support for nested transactions
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
fsspec.transaction.Transaction() context manager should support nested transactions.
example usage:
def func1():
fs = fsspec.filesystem('file')
with fs.transaction:
#write some files
...
func2(fs)
def func2(fs):
#this function does not know if the caller function already started a transaction on fs or not
with fs.transaction:
#write some other files
...
in the current implementation the transaction will complete (commit) once the with block in func2() completes
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with fsspec.transaction.Transaction and trace how entering and exiting the context manager currently commits. Define the behavior for an inner transaction and an outer transaction, then verify that the example keeps the transaction open until the outer with block exits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100