Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bench-db on windows #975

Merged
merged 5 commits into from
Nov 8, 2019
Merged

Fix bench-db on windows #975

merged 5 commits into from
Nov 8, 2019

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Nov 7, 2019

Relates to #703.

Overview

The database benchmark was failing with:

cardano-wallet-core-2019.11.6-bench-db.exe: C:\users\rodney\Temp\benf0f5.db: DeleteFile "\\\\?\\C:\\users\\rodney\\Temp\\benf0f5.db": permission denied (Sharing violation.)

And:

db.exe: <stdout>: commitBuffer: invalid argument (Invalid argument)

It works on windows but not under wine (encoding problem).

@rvl rvl self-assigned this Nov 7, 2019
@rvl rvl force-pushed the rvl/703/db-bench-windows branch 2 times, most recently from cb2b05f to af38c7f Compare November 8, 2019 03:39
@rvl rvl marked this pull request as ready for review November 8, 2019 03:41
rvl and others added 5 commits November 8, 2019 09:03
Prevents a crash on Windows and non-UTF-8 locales on other systems.
Previous change to close database was causing this error with disk
space benchmarks, which also close the database.

    db: SQLite3 returned ErrorMisuse while attempting to perform close: bad parameter or other API misuse
@KtorZ
Copy link
Member

KtorZ commented Nov 8, 2019

@rvl not sure if you have anything to add here so not triggering bors.
Feel free to.

@KtorZ
Copy link
Member

KtorZ commented Nov 8, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Nov 8, 2019
975: Fix bench-db on windows r=KtorZ a=rvl

Relates to #703.

# Overview

The database benchmark was failing with:

```
cardano-wallet-core-2019.11.6-bench-db.exe: C:\users\rodney\Temp\benf0f5.db: DeleteFile "\\\\?\\C:\\users\\rodney\\Temp\\benf0f5.db": permission denied (Sharing violation.)
```

And:

```
db.exe: <stdout>: commitBuffer: invalid argument (Invalid argument)
```

It works on windows but not under wine (encoding problem).



980: Move delegation certificate declaration in a separate table r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#913

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have moved tracking of delegation "certificate" into a separate SQLite table
- [x] I have adjusted `readWalletMetadata` to now pull the delegation status from the right table 
- [x] I have added a `putDelegationCertificate` function to insert a new row in the database when new certificates are discovered
- [x] I have extended the state-machine tests accordingly, with proper tagging

# Comments

<!-- Additional comments or screenshots to attach if any -->

```
Cardano.Wallet.DB.Sqlite
  Sqlite State machine tests
    Sequential
      +++ OK, passed 400 tests:
      65.8% UnsuccessfulReadTxHistory
      57.8% SuccessfulReadCheckpoint
      57.2% CreateThenList
      55.0% TxUnsortedInputs
      54.8% TxUnsortedOutputs
      49.0% CreateWalletTwice
      32.5% ReadTxHistoryAfterDelete
      28.5% PutCheckpointTwice
      27.8% UnsuccessfulReadCheckpoint
      24.8% ReadMetaAfterPutCert
      22.5% CreateThreeWallets
      18.5% RemovePendingTxTwice
      17.5% RolledBackOnce
      14.2% SuccessfulReadPrivateKey
      13.2% SuccessfulReadTxHistory
      12.0% RemoveWalletTwice
    Parallel
      # PENDING: No reason given
  Sqlite State machine (RndState)
    Sequential state machine tests
      +++ OK, passed 400 tests:
      65.8% UnsuccessfulReadTxHistory
      57.8% SuccessfulReadCheckpoint
      57.2% CreateThenList
      55.0% TxUnsortedInputs
      54.8% TxUnsortedOutputs
      49.0% CreateWalletTwice
      32.5% ReadTxHistoryAfterDelete
      28.5% PutCheckpointTwice
      27.8% UnsuccessfulReadCheckpoint
      24.8% ReadMetaAfterPutCert
      22.5% CreateThreeWallets
      18.5% RemovePendingTxTwice
      17.5% RolledBackOnce
      14.2% SuccessfulReadPrivateKey
      13.2% SuccessfulReadTxHistory
      12.0% RemoveWalletTwice
```

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Rodney Lorrimar <[email protected]>
Co-authored-by: KtorZ <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Nov 8, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit 37a4bdc into master Nov 8, 2019
@rvl rvl deleted the rvl/703/db-bench-windows branch November 8, 2019 18:45
@KtorZ KtorZ added this to the Usability & Compatibility milestone Nov 12, 2019
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