Skip to content

fix(drive): db is in readonly mode due to the active transaction#567

Merged
shumkov merged 2 commits into
masterfrom
fix-remove-document
Oct 10, 2022
Merged

fix(drive): db is in readonly mode due to the active transaction#567
shumkov merged 2 commits into
masterfrom
fix-remove-document

Conversation

@shumkov

@shumkov shumkov commented Oct 10, 2022

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

[2022-10-10 16:13:43.307 +0000] FATAL (36 on 605f854e1d5b): db is in readonly mode due to the active transaction. Please provide transaction or commit it
    driveVersion: "0.23.0-alpha.2"
    err: {
      "type": "Error",
      "message": "db is in readonly mode due to the active transaction. Please provide transaction or commit it",
      "stack":
          Error: db is in readonly mode due to the active transaction. Please provide transaction or commit it
              at Object.appendStackWrapper (/platform/.yarn/unplugged/@dashevo-rs-drive-npm-0.23.0-dev.8-a11a98b062/node_modules/@dashevo/rs-drive/node/appendStack.js:10:18)
              at async DocumentRepository.delete (/platform/packages/js-drive/lib/document/DocumentRepository.js:194:45)
              at async handleRemovedMasternode (/platform/packages/js-drive/lib/identity/masternode/handleRemovedMasternodeFactory.js:30:7)
              at async synchronizeMasternodeIdentities (/platform/packages/js-drive/lib/identity/masternode/synchronizeMasternodeIdentitiesFactory.js:185:9)
              at async Object.initChainHandler [as initChain] (/platform/packages/js-drive/lib/abci/handlers/initChainHandlerFactory.js:76:51)
              at async Connection.handleRequest (/platform/.yarn/cache/@dashevo-abci-npm-0.23.0-dev.1-4b76d57180-6a7cf16ed9.zip/node_modules/@dashevo/abci/lib/handleRequestFactory.js:55:29)
              at async Connection.readNextRequest (/platform/.yarn/cache/@dashevo-abci-npm-0.23.0-dev.1-4b76d57180-6a7cf16ed9.zip/node_modules/@dashevo/abci/lib/Connection.js:169:18)
    }

What was done?

  • Fixed transaction flag for handleRemovedMasternode
  • Updated synchronizeMasternodeIdentities test to use transaction

How Has This Been Tested?

With tests

Breaking Changes

None

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@shumkov
shumkov changed the base branch from v0.24-dev to master October 10, 2022 16:42
@shuplenkov
shuplenkov self-requested a review October 10, 2022 17:43
@shuplenkov shuplenkov added this to the v0.23.0 milestone Oct 10, 2022
@shumkov
shumkov marked this pull request as ready for review October 10, 2022 17:43
@shumkov
shumkov requested a review from antouhou as a code owner October 10, 2022 17:43
@shumkov
shumkov merged commit 65b8439 into master Oct 10, 2022
@shumkov
shumkov deleted the fix-remove-document branch October 10, 2022 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants