forked from Qortal/qortal
Another attempt to prevent "serialization failure" during trimming
This commit is contained in:
parent
253a994438
commit
58ed72058f
@ -90,7 +90,10 @@ public interface ATRepository {
|
||||
/** Returns height of first trimmable AT state. */
|
||||
public int getAtTrimHeight() throws DataException;
|
||||
|
||||
/** Sets new base height for AT state trimming. */
|
||||
/** Sets new base height for AT state trimming.
|
||||
* <p>
|
||||
* NOTE: performs implicit <tt>repository.saveChanges()</tt>.
|
||||
*/
|
||||
public void setAtTrimHeight(int trimHeight) throws DataException;
|
||||
|
||||
/** Hook to allow repository to prepare/cache info for AT state trimming. */
|
||||
|
@ -146,7 +146,10 @@ public interface BlockRepository {
|
||||
/** Returns height of first trimmable online accounts signatures. */
|
||||
public int getOnlineAccountsSignaturesTrimHeight() throws DataException;
|
||||
|
||||
/** Sets new base height for trimming online accounts signatures. */
|
||||
/** Sets new base height for trimming online accounts signatures.
|
||||
* <p>
|
||||
* NOTE: performs implicit <tt>repository.saveChanges()</tt>.
|
||||
*/
|
||||
public void setOnlineAccountsSignaturesTrimHeight(int trimHeight) throws DataException;
|
||||
|
||||
/**
|
||||
|
@ -425,6 +425,7 @@ public class HSQLDBATRepository implements ATRepository {
|
||||
|
||||
try {
|
||||
this.repository.executeCheckedUpdate(updateSql, trimHeight);
|
||||
this.repository.saveChanges();
|
||||
} catch (SQLException e) {
|
||||
repository.examineException(e);
|
||||
throw new DataException("Unable to set AT state trim height in repository", e);
|
||||
|
@ -484,6 +484,7 @@ public class HSQLDBBlockRepository implements BlockRepository {
|
||||
|
||||
try {
|
||||
this.repository.executeCheckedUpdate(updateSql, trimHeight);
|
||||
this.repository.saveChanges();
|
||||
} catch (SQLException e) {
|
||||
repository.examineException(e);
|
||||
throw new DataException("Unable to set online accounts signatures trim height in repository", e);
|
||||
|
Loading…
Reference in New Issue
Block a user