Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

uses current local timestamp when recording purged values (backport #16573) #16675

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Apr 20, 2021

This is an automatic backport of pull request #16573 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.io/

CrdsGossipPull.purged_values is meant to record recently purged values
so that they are excluded from imminent pull requests, until the entire
cluster have synced to the updated value:
https://github.com/solana-labs/solana/blob/c826cddbb/core/src/crds_gossip_pull.rs#L449-L454

However, VersionedCrdsValue.local_timestamp represents the local time
when the value was last updated, and given that crds values may have
different timeouts based on stake, it does not necessarily represent how
recently the value was purged:
https://github.com/solana-labs/solana/blob/c826cddbb/core/src/crds.rs#L75-L76

As such, recording current local timestamp when purging values is more
appropriate. Additionally, purge_purged assumes that the purge_values is
sorted in timestamps when draining the old ones; which is not true if
those timestamps are VersionedCrdsValue.local_timestamp:
https://github.com/solana-labs/solana/blob/c826cddbb/core/src/crds_gossip_pull.rs#L563-L571

(cherry picked from commit bc90e04)
@mergify mergify bot added the automerge Merge this Pull Request automatically once CI passes label Apr 20, 2021
@codecov
Copy link

codecov bot commented Apr 20, 2021

Codecov Report

Merging #16675 (43d8a14) into v1.6 (558a46f) will increase coverage by 0.0%.
The diff coverage is 66.6%.

@@           Coverage Diff           @@
##             v1.6   #16675   +/-   ##
=======================================
  Coverage    82.9%    83.0%           
=======================================
  Files         414      414           
  Lines      113667   113664    -3     
=======================================
+ Hits        94337    94344    +7     
+ Misses      19330    19320   -10     

@mergify mergify bot merged commit a883664 into v1.6 Apr 20, 2021
@mergify mergify bot deleted the mergify/bp/v1.6/pr-16573 branch April 20, 2021 12:42
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant