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

router: Optimize pruning zombie channels. #2799

Closed

Commits on Mar 18, 2019

  1. router: Optimize pruning zombie channels.

    This commit introduces a different, more optimized, appraoch to prune
    zombie channels.
    "zombie channels" stands for channels that their last channel policy
    was update time was earlier than "channe expiry", configured by default
    to a period of 14 days.
    The current approach iterates all channels in the graph in order to
    filter those in need. This approach is time consuming, several seconds
    on my mobile device for ~40,000 channels, while during this time the
    db is locked in a transaction.
    
    The proposed change is to use an existing functionality that utilize the
    fact that channel update are saved indexed by date. This method enables
    us to go over only a small subset of the channels, only those that
    were updated before the "channel expiry" time and further filter
    them for our need.
    The same graph that took several seconds to prune was pruned, after
    the change in several milliseconds.
    roeierez committed Mar 18, 2019
    Configuration menu
    Copy the full SHA
    4f06ae6 View commit details
    Browse the repository at this point in the history