Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

feat(s3): bootstrap the cache from S3 #94

Merged
merged 1 commit into from
Jan 17, 2024
Merged

feat(s3): bootstrap the cache from S3 #94

merged 1 commit into from
Jan 17, 2024

Conversation

dtfiedler
Copy link
Collaborator

@dtfiedler dtfiedler commented Jan 17, 2024

This speeds up the time to load various contracts, we will later add updating the cache on shutdown or something similar.

Logs:

{"level":"info","message":"Bootstrapping warp cache from S3","params":{"Bucket":"arns-warp-cache","Key":"cache"},"timestamp":"2024-01-17T01:09:08.598Z"}
{"keepAliveTimeout":180000,"level":"info","message":"Server is listening...","port":3000,"requestTimeout":180000,"timestamp":"2024-01-17T01:09:08.604Z"}
{"durationMs":8367,"level":"info","message":"Successfully bootstrapped warp cache from S3","timestamp":"2024-01-17T01:09:16.961Z"}
{"contractTxIds":["bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U","fbU8Y4NMKKzP4rmAYeYj6tDrVDo9XNbdyq5IZPA31WQ"],"level":"info","message":"Pre-fetching contracts...","timestamp":"2024-01-17T01:09:16.962Z"}
{"contractTxId":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U","level":"info","message":"Pre-fetching contract state...","startTimestamp":1705453756962,"timestamp":"2024-01-17T01:09:16.962Z"}
{"contractTxId":"fbU8Y4NMKKzP4rmAYeYj6tDrVDo9XNbdyq5IZPA31WQ","level":"info","message":"Pre-fetching contract state...","startTimestamp":1705453756976,"timestamp":"2024-01-17T01:09:16.976Z"}
{"contractTxId":"fbU8Y4NMKKzP4rmAYeYj6tDrVDo9XNbdyq5IZPA31WQ","durationMs":1223,"level":"info","message":"Successfully prefetched contract state","timestamp":"2024-01-17T01:09:18.199Z"}
{"contractTxId":"bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U","durationMs":1339,"level":"info","message":"Successfully prefetched contract state","timestamp":"2024-01-17T01:09:18.301Z"}
{"contractTxIds":["bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U","fbU8Y4NMKKzP4rmAYeYj6tDrVDo9XNbdyq5IZPA31WQ"],"durationMs":1340,"level":"info","message":"Finished pre-fetching contracts","success":true,"timestamp":"2024-01-17T01:09:18.302Z"}

Previous boot times were > 10 mins to load both these contracts.

@dtfiedler dtfiedler requested a review from a team as a code owner January 17, 2024 00:43
This speeds up the time to load various contracts, we will later add updating the cache on shutdown or something similar
@dtfiedler dtfiedler changed the title feat(s3): bootrap the cache from S3 if env set to do so feat(s3): bootstrap the cache from S3 if env set to do so Jan 17, 2024
@dtfiedler dtfiedler changed the title feat(s3): bootstrap the cache from S3 if env set to do so feat(s3): bootstrap the cache from S3 Jan 17, 2024
Copy link
Contributor

@fedellen fedellen left a comment

Choose a reason for hiding this comment

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

rubber stamping, I intend to return to this for more detailed look

@dtfiedler dtfiedler merged commit fbbaba8 into main Jan 17, 2024
6 checks passed
@dtfiedler dtfiedler deleted the PE-5330-bootstrap branch January 17, 2024 01:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants