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

CAD-391 eliding messages #445

Merged
merged 6 commits into from
Jan 8, 2020
Merged

CAD-391 eliding messages #445

merged 6 commits into from
Jan 8, 2020

Conversation

CodiePP
Copy link
Contributor

@CodiePP CodiePP commented Dec 24, 2019

prints first and last message of range of equivalent 'TraceLedgerReplayEvent'.

[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.00 UTC] {"event":{"kind":"TraceOpenEvent.OpenedVolDB"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.31 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 9","kind":"snapshot"},"kind":"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3549092}, blockPointHash = ByronHash {unByronHash = AbstractHash 2cfa35fe9617a9c41ef5ec19bed50742e587ab10d18ce6ac80c09bf71308fc3e}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 9","kind":"snapshot"},"kind":"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3549092}, blockPointHash = ByronHash {unByronHash = AbstractHash 2cfa35fe9617a9c41ef5ec19bed50742e587ab10d18ce6ac80c09bf71308fc3e}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] messages elided in total = 70
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] {"event":{"kind":"TraceOpenEvent.OpenedLgrDB"},"kind":"TraceEvent","tip":"genesis(origin)"}

@CodiePP CodiePP added the WIP Work In Progress (cannot be merged yet) label Dec 24, 2019
@CodiePP CodiePP changed the title CAD-391 WIP: experimenting with eliding messages CAD-391 eliding messages Dec 24, 2019
@CodiePP CodiePP requested a review from mrBliss December 24, 2019 23:33
@CodiePP CodiePP removed the WIP Work In Progress (cannot be merged yet) label Dec 24, 2019
@CodiePP CodiePP added this to the S3 2020-01-02 milestone Dec 24, 2019
@CodiePP CodiePP marked this pull request as ready for review December 24, 2019 23:34
@CodiePP CodiePP added the WIP Work In Progress (cannot be merged yet) label Dec 27, 2019
@CodiePP
Copy link
Contributor Author

CodiePP commented Dec 27, 2019

depends on PR input-output-hk/iohk-monitoring-framework#495

@CodiePP CodiePP force-pushed the cad-391-log-startup branch from 459492e to 355f39d Compare December 30, 2019 12:06
@CodiePP CodiePP requested a review from Jimbo4350 December 30, 2019 13:05
@CodiePP
Copy link
Contributor Author

CodiePP commented Dec 30, 2019

eliding TraceLedgerReplayEvent:

[nixos19:cardano.node.ChainDB:Info:63] [2019-12-30 13:06:34.52 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 19","kind":"snapshot"},"kind":
"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3560492}, blockPointHash = ByronHash {unBy
ronHash = AbstractHash 3ac09146dbc3c75e298543a22223ac3aeeab387d9ddecedac5cbe6465db34dc0}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:63] [2019-12-30 13:06:34.78 UTC] before next, messages elided = 1432
[nixos19:cardano.node.ChainDB:Info:63] [2019-12-30 13:06:34.78 UTC] {"event":{"kind":"TraceLedgerReplayEvent.ReplayedBlock","slot":"3542400","epoch":"164"},"kind":"TraceEvent","tip":"genesis(origin)"}

eliding TraceGCEvent:

[nixos19:cardano.node.ChainDB:Debug:79] [2019-12-30 13:07:09.88 UTC] {"event":{"kind":"TraceGCEvent.PerformedGC","slot":{"kind":"SlotNo","slot":3562021}},"kind":"TraceEvent","tip":"4cac1a8@3567746"}
[nixos19:cardano.node.ChainDB:Debug:81] [2019-12-30 13:07:09.88 UTC] before next, messages elided = 2
[nixos19:cardano.node.ChainDB:Debug:81] [2019-12-30 13:07:09.88 UTC] {"event":{"kind":"TraceGCEvent.PerformedGC","slot":{"kind":"SlotNo","slot":3562025}},"kind":"TraceEvent","tip":"4cac1a8@3567746"}

@CodiePP CodiePP removed the WIP Work In Progress (cannot be merged yet) label Dec 30, 2019
@CodiePP
Copy link
Contributor Author

CodiePP commented Dec 30, 2019

depends on PR input-output-hk/iohk-monitoring-framework#495

upstream PR has been merged. now ready.

@CodiePP CodiePP force-pushed the cad-391-log-startup branch from f19beac to 54c8875 Compare January 3, 2020 16:33
@CodiePP CodiePP modified the milestones: S3 2020-01-02, S4 2020-01-16 Jan 3, 2020
@CodiePP CodiePP requested review from deepfire and ksaric January 7, 2020 07:53
Copy link
Contributor

@ksaric ksaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about some of the stuff, left comments.

rm -rf db-mainnet-0
fi
rm node-0*
#if [ -d db-mainnet-0 ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to remove this? I'm not sure if this is intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, no, this is from debugging


date --iso-8601=seconds > STARTTIME

NODE="cabal v2-run exe:cardano-node -- "
NODE="stack --nix exec cardano-node -- "
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably needs an if.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, switched to 'stack'. Changing the order of the definitions will use stack/cabal.

@@ -1,5 +1,5 @@
# global filter; messages must have at least this severity to pass:
minSeverity: Notice
minSeverity: Debug
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just the Debug messages?

@@ -68,6 +68,8 @@ options:
# Change the `subtrace` value to `Neutral` in order to log
# `UTxO`-related messages during epoch validation.
subtrace: NoTrace
'cardano.#messagecounters':
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need this, since input-output-hk/iohk-monitoring-framework#496 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once that PR is merged, then no more.

@@ -11,7 +11,10 @@ set -euo pipefail

cd ${TARGETDIR}

cabal v2-run exe:cardano-byron-proxy -- \
RUNNER="cabal v2-run exe:cardano-byron-proxy --"
RUNNER="stack --nix exec cardano-byron-proxy --"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably needs an if as well.

instance ElidingTracer
(WithSeverity (WithTip blk (ChainDB.TraceEvent blk))) where
-- equivalent by type and severity
isEquivalent (WithSeverity s1 (WithTip _tip1 (ChainDB.TraceLedgerReplayEvent _ev1)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are both TraceLedgerReplayEvent and have the same severity? No need to match on the actual event of TraceLedgerReplayEvent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

equivalence just by comparing severity and the type; could be made more complicated..

Signed-off-by: Alexander Diemand <[email protected]>
Copy link
Contributor

@ksaric ksaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@CodiePP
Copy link
Contributor Author

CodiePP commented Jan 8, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Jan 8, 2020
445: CAD-391 eliding messages r=CodiePP a=CodiePP

prints first and last message of range of equivalent 'TraceLedgerReplayEvent'.
```
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.00 UTC] {"event":{"kind":"TraceOpenEvent.OpenedVolDB"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.31 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 9","kind":"snapshot"},"kind":"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3549092}, blockPointHash = ByronHash {unByronHash = AbstractHash 2cfa35fe9617a9c41ef5ec19bed50742e587ab10d18ce6ac80c09bf71308fc3e}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 9","kind":"snapshot"},"kind":"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3549092}, blockPointHash = ByronHash {unByronHash = AbstractHash 2cfa35fe9617a9c41ef5ec19bed50742e587ab10d18ce6ac80c09bf71308fc3e}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] messages elided in total = 70
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] {"event":{"kind":"TraceOpenEvent.OpenedLgrDB"},"kind":"TraceEvent","tip":"genesis(origin)"}
```

Co-authored-by: Alexander Diemand <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 8, 2020

Build failed

@CodiePP
Copy link
Contributor Author

CodiePP commented Jan 8, 2020

bors r+

iohk-bors bot added a commit that referenced this pull request Jan 8, 2020
445: CAD-391 eliding messages r=CodiePP a=CodiePP

prints first and last message of range of equivalent 'TraceLedgerReplayEvent'.
```
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.00 UTC] {"event":{"kind":"TraceOpenEvent.OpenedVolDB"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.31 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 9","kind":"snapshot"},"kind":"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3549092}, blockPointHash = ByronHash {unByronHash = AbstractHash 2cfa35fe9617a9c41ef5ec19bed50742e587ab10d18ce6ac80c09bf71308fc3e}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] {"event":{"snapshot":{"snapshot":"DiskSnapshot 9","kind":"snapshot"},"kind":"TraceLedgerReplayEvent.ReplayFromSnapshot","tip":"Tip (At (Block {blockPointSlot = SlotNo {unSlotNo = 3549092}, blockPointHash = ByronHash {unByronHash = AbstractHash 2cfa35fe9617a9c41ef5ec19bed50742e587ab10d18ce6ac80c09bf71308fc3e}}))"},"kind":"TraceEvent","tip":"genesis(origin)"}
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] messages elided in total = 70
[nixos19:cardano.node.ChainDB:Info:64] [2019-12-24 23:26:57.39 UTC] {"event":{"kind":"TraceOpenEvent.OpenedLgrDB"},"kind":"TraceEvent","tip":"genesis(origin)"}
```

Co-authored-by: Alexander Diemand <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Jan 8, 2020

@iohk-bors iohk-bors bot merged commit cdfe112 into master Jan 8, 2020
@iohk-bors iohk-bors bot deleted the cad-391-log-startup branch January 8, 2020 13:17
@CodiePP CodiePP added the byron Required for a Byron mainnet: replace the old core nodes with cardano-node. label Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
byron Required for a Byron mainnet: replace the old core nodes with cardano-node.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants