binpash / binpash/hs

Enhancing Commit Operations via Nested Overlays

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
major change optimization
Dominant language
Shell
Stars
19
Forks
0
PR merge metrics
No merged PRs in 30d

Description

**Description:**
While attempting to commit the changes from sandboxes to our primary workspace, it's imperative that overlay operations are halted, because interfering with the lower dir (our main workspace) could lead to undefined behavior. Currently, we have to terminate all running commands that are executing in the overlay, commit the changes, and then restart them. This sequence disrupts the flow of operations and destroys speculation.

**Proposed Solution:**
We could consider the implementation of nested overlays. Upon the completion of a command, we can instantiate a nested overlay and initiate its successor within it, and continue this pattern recursively. At some point we will commit all nested overlays to the main workspace, therefore a single commit step will actually commit multiple nodes.

*Note:* It is not obvious how to implement this, whether it is possible and what are the overheads of this.

**Benefits:**

* Potentially reduces the need to repeatedly kill and restart command nodes.
* Provides a smoother and more efficient commit operation by minimizing disruptions.

**Potential Challenges:**

* Complexity: Introducing nested overlays can significantly increase system complexity, making debugging and maintenance more challenging. We will likely require a major scheduler refactor.
* Consistency Issues: Ensuring data consistency across multiple nested layers might be more difficult compared to a single overlay layer. The issue with lower layer is still there: when spawning a nested overlay, the parent upper dir is suddenly a lower dir, we have the same constraints.
* Resource Limitations: How many nested overlays are supported?
* Error Propagation: An error in a nested overlay might propagate to higher levels, we should carefully choose when to spawn/commit this chain of commands.

**Next Steps:**

It's crucial to design a detailed solution sketch. This sketch should highlight the implementation strategy, expected benefits, and potential drawbacks.

Further discussion is necessary.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.