...
However, it is possible that a staging graph for the latest commit is not yet available. This can happen when multiple updates are made to the same branch concurrently and the triplestore has not yet had enough time to COPY
the snapshot graph to a dedicated staging graph. In this scenario, MMS5 Flexo MMS uses the snapshot graph as an effective staging graph. This technique ultimately defers the COPY
operation to a later time once any concurrent writes have settled. See https://openmbee.atlassian.net/wiki/spaces/OPENMBEE/pages/616497153/Layer+1+Update+Procedure#Effective-staging-graph-example below for an example of using an ephemeral snapshot as an effective staging graph.
...
Having selected an effective staging graph to apply the model update to, MMS5 Flexo MMS then executes a SPARQL update against the triplestore that performs several operations at a single atomic unit. They are summarized as:
acquire an exclusive write lock to the effective staging graph
detach the effective staging graph from its current owner
create a new ephemeral commit object in the project’s metadata graph
apply the model update to the effective staging graph
attach the effective staging graph to the new ephemeral commitrelease the write lock
1.4. Commit stabilization
Following a series of 1 or more successive writes to a branch, the server must stabilize commit data by creating new staging graphs and dropping old snapshots that are no longer needed. Delaying this action by some predetermined amount of time will helps improve the performance of any queries or updates that target or depend on the parent commit before its snapshot is dropped.
Effective staging graph example
...
At this point, 17ccd
does not yet have its own staging graph. Since it is brand new, it’s snapshot graph is marked as “ephemeral”, which means that (a) it does not yet have a staging graph and (b) it’s (super*)parent still has a snapshot being used for interim reads and updates. Before a staging graph for this new commit is built, MMS5 Flexo MMS finishes processing any remaining concurrent updates. In this example, one such update creates a new commit 8f155
. The server uses the aforementioned ephemeral snapshot graph as the effective staging graph to apply this update. The new state of the model at #03
looks like:
...
Once the pipeline of concurrent writes have ceased, MMS5 Flexo MMS is able to stabilize the latest commit’s snapshot at #04
:
...
Finally, the now expired snapshot for the original commit is dropped and MMS5 Flexo MMS settles on the resting state for this model at #05
:
...