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

[indexer grpc] Improve the read consistency for fullnode GRPC. #15065

Conversation

larry-aptos
Copy link
Contributor

@larry-aptos larry-aptos commented Oct 23, 2024

Description

In this PR, fullnode will serve data based on the ledger and table info versions. With this change, the API result would be consistent since ledger db and table info are consistent for requested version.

How Has This Been Tested?

  • Tested in forge and looks good: processing is tightly bounded by fullnode version.

image

Key Areas to Review

Type of Change

  • New feature
  • Bug fix
  • Breaking change
  • Performance improvement
  • Refactoring
  • Dependency update
  • Documentation update
  • Tests

Which Components or Systems Does This Change Impact?

  • Validator Node
  • Full Node (API, Indexer, etc.)
  • Move/Aptos Virtual Machine
  • Aptos Framework
  • Aptos CLI/SDK
  • Developer Infrastructure
  • Move Compiler
  • Other (specify)

Checklist

  • I have read and followed the CONTRIBUTING doc
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I identified and added all stakeholders and component owners affected by this change as reviewers
  • I tested both happy and unhappy path of the functionality
  • I have made corresponding changes to the documentation

Copy link

trunk-io bot commented Oct 23, 2024

⏱️ 2h 46m total CI duration on this PR
Slowest 15 Jobs Cumulative Duration Recent Runs
execution-performance / single-node-performance 43m 🟩🟩
rust-smoke-tests 30m 🟥
test-target-determinator 15m 🟩🟩🟩
rust-move-tests 10m 🟩
rust-move-tests 10m 🟩
execution-performance / test-target-determinator 9m 🟩🟩
rust-move-tests 9m 🟩
rust-cargo-deny 7m 🟩🟩🟩 (+1 more)
check 7m 🟩🟩
check-dynamic-deps 5m 🟩🟩🟩🟩🟩 (+1 more)
rust-doc-tests 5m 🟩
rust-doc-tests 4m 🟩
fetch-last-released-docker-image-tag 3m 🟩🟩
semgrep/ci 2m 🟩🟩🟩🟩🟩 (+1 more)
general-lints 2m 🟩🟩🟩🟩🟩 (+1 more)

🚨 1 job on the last run was significantly faster/slower than expected

Job Duration vs 7d avg Delta
execution-performance / test-target-determinator 5m 4m +26%

settingsfeedbackdocs ⋅ learn more about trunk.io

@larry-aptos larry-aptos marked this pull request as ready for review October 23, 2024 20:37
Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @larry-aptos and the rest of your teammates on Graphite Graphite

@larry-aptos larry-aptos added the CICD:build-images when this label is present github actions will start build+push rust images from the PR. label Oct 23, 2024
@larry-aptos larry-aptos force-pushed the 10-23-indexer_grpc_fullnode_now_consider_both_indexer_ledger_version_table_info_version_to_have_strong_consistency branch from ca1a50d to a12162d Compare October 23, 2024 20:39
@larry-aptos larry-aptos changed the title indexer grpc fullnode now consider both indexer ledger version + table info version to have strong consistency. [indexer grpc] Improve the read consistency for fullnode GRPC. Oct 23, 2024
@larry-aptos larry-aptos force-pushed the 10-23-indexer_grpc_fullnode_now_consider_both_indexer_ledger_version_table_info_version_to_have_strong_consistency branch from a12162d to 6272cf4 Compare October 24, 2024 00:13
@larry-aptos larry-aptos enabled auto-merge (squash) October 24, 2024 00:14

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@larry-aptos larry-aptos force-pushed the 10-23-indexer_grpc_fullnode_now_consider_both_indexer_ledger_version_table_info_version_to_have_strong_consistency branch from 6272cf4 to 0919fcd Compare October 24, 2024 19:03
@larry-aptos larry-aptos requested a review from a team October 24, 2024 19:05

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

✅ Forge suite realistic_env_max_load success on 0919fcda9f5251949b000d89d7fb3d8b05c352f9

two traffics test: inner traffic : committed: 13795.29 txn/s, latency: 2877.34 ms, (p50: 2700 ms, p70: 2900, p90: 3000 ms, p99: 4500 ms), latency samples: 5245300
two traffics test : committed: 99.93 txn/s, latency: 1509.55 ms, (p50: 1400 ms, p70: 1500, p90: 1700 ms, p99: 4500 ms), latency samples: 1760
Latency breakdown for phase 0: ["MempoolToBlockCreation: max: 2.028, avg: 1.648", "ConsensusProposalToOrdered: max: 0.331, avg: 0.303", "ConsensusOrderedToCommit: max: 0.395, avg: 0.375", "ConsensusProposalToCommit: max: 0.700, avg: 0.678"]
Max non-epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 0.81s no progress at version 2678792 (avg 0.21s) [limit 15].
Max epoch-change gap was: 0 rounds at version 0 (avg 0.00) [limit 4], 8.30s no progress at version 2678790 (avg 8.30s) [limit 15].
Test Ok

Copy link
Contributor

✅ Forge suite compat success on b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> 0919fcda9f5251949b000d89d7fb3d8b05c352f9

Compatibility test results for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> 0919fcda9f5251949b000d89d7fb3d8b05c352f9 (PR)
1. Check liveness of validators at old version: b29f09f57e898d8d211c8bc3e303f6e50bba2266
compatibility::simple-validator-upgrade::liveness-check : committed: 14665.09 txn/s, latency: 2325.62 ms, (p50: 2100 ms, p70: 2100, p90: 2400 ms, p99: 6800 ms), latency samples: 470780
2. Upgrading first Validator to new version: 0919fcda9f5251949b000d89d7fb3d8b05c352f9
compatibility::simple-validator-upgrade::single-validator-upgrading : committed: 6284.95 txn/s, latency: 4537.61 ms, (p50: 5200 ms, p70: 5500, p90: 5600 ms, p99: 5800 ms), latency samples: 113040
compatibility::simple-validator-upgrade::single-validator-upgrade : committed: 6456.44 txn/s, latency: 4964.20 ms, (p50: 5500 ms, p70: 5700, p90: 5800 ms, p99: 6000 ms), latency samples: 212700
3. Upgrading rest of first batch to new version: 0919fcda9f5251949b000d89d7fb3d8b05c352f9
compatibility::simple-validator-upgrade::half-validator-upgrading : committed: 6412.30 txn/s, latency: 4414.30 ms, (p50: 5100 ms, p70: 5300, p90: 5600 ms, p99: 5700 ms), latency samples: 117200
compatibility::simple-validator-upgrade::half-validator-upgrade : committed: 5978.96 txn/s, latency: 5150.14 ms, (p50: 5400 ms, p70: 5500, p90: 6600 ms, p99: 6900 ms), latency samples: 228320
4. upgrading second batch to new version: 0919fcda9f5251949b000d89d7fb3d8b05c352f9
compatibility::simple-validator-upgrade::rest-validator-upgrading : committed: 7817.04 txn/s, latency: 3554.58 ms, (p50: 3700 ms, p70: 4100, p90: 4800 ms, p99: 5900 ms), latency samples: 149780
compatibility::simple-validator-upgrade::rest-validator-upgrade : committed: 7600.13 txn/s, latency: 4143.45 ms, (p50: 4100 ms, p70: 4900, p90: 5800 ms, p99: 6700 ms), latency samples: 252820
5. check swarm health
Compatibility test for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> 0919fcda9f5251949b000d89d7fb3d8b05c352f9 passed
Test Ok

Copy link
Contributor

✅ Forge suite framework_upgrade success on b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> 0919fcda9f5251949b000d89d7fb3d8b05c352f9

Compatibility test results for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> 0919fcda9f5251949b000d89d7fb3d8b05c352f9 (PR)
Upgrade the nodes to version: 0919fcda9f5251949b000d89d7fb3d8b05c352f9
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1152.84 txn/s, submitted: 1154.19 txn/s, failed submission: 1.35 txn/s, expired: 1.35 txn/s, latency: 2732.35 ms, (p50: 2400 ms, p70: 3000, p90: 4800 ms, p99: 5900 ms), latency samples: 102680
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1124.05 txn/s, submitted: 1125.88 txn/s, failed submission: 1.84 txn/s, expired: 1.84 txn/s, latency: 2783.69 ms, (p50: 2700 ms, p70: 3000, p90: 4300 ms, p99: 6100 ms), latency samples: 97920
5. check swarm health
Compatibility test for b29f09f57e898d8d211c8bc3e303f6e50bba2266 ==> 0919fcda9f5251949b000d89d7fb3d8b05c352f9 passed
Upgrade the remaining nodes to version: 0919fcda9f5251949b000d89d7fb3d8b05c352f9
framework_upgrade::framework-upgrade::full-framework-upgrade : committed: 1050.25 txn/s, submitted: 1052.71 txn/s, failed submission: 2.46 txn/s, expired: 2.46 txn/s, latency: 2855.44 ms, (p50: 2700 ms, p70: 3000, p90: 4500 ms, p99: 6100 ms), latency samples: 93880
Test Ok

@larry-aptos larry-aptos merged commit d035d74 into main Nov 13, 2024
48 checks passed
@larry-aptos larry-aptos deleted the 10-23-indexer_grpc_fullnode_now_consider_both_indexer_ledger_version_table_info_version_to_have_strong_consistency branch November 13, 2024 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CICD:build-images when this label is present github actions will start build+push rust images from the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants