You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IPersistencePlugin is invented to allow plugins to observe the persisted blocks. There are currently several plugins implementing this interface. However, misuses exist within them.
If there are multiple persistence plugins loaded and one of them throws an exception, then none of them should actually commit anything to a persistent store. To facilitate this behavior, I added an OnCommit method to be called after all plugins have had a chance to process results from OnPersist and throw if something was wrong.
A persistence plugin implementing IPersistencePlugin should do any processing needed to stage data to persist in its OnPersist method, and then perform actual persistence in its OnCommit method. In this way database integrity is maximized.
IPersistencePlugin should not persist data directly in OnPersist. But such practises do exist in LogReader & StatePlugin.
The text was updated successfully, but these errors were encountered:
IPersistencePlugin is invented to allow plugins to observe the persisted blocks. There are currently several plugins implementing this interface. However, misuses exist within them.
According to neo-project/neo#568:
IPersistencePlugin should not persist data directly in OnPersist. But such practises do exist in LogReader & StatePlugin.
The text was updated successfully, but these errors were encountered: