• Yorick Peterse's avatar
    Fix sticking of the database load balancer · 424c2771
    Yorick Peterse authored
    There were 3 problems with sticking:
    
    1. When sticking to a request (based on a previous request) we would
       always overwrite the WAL pointer, leading to a user being stuck to
       the primary for too long.
    
    2. Sticking was not working for the Grape API. The API in particular is
       tricky because we have to stick either using a user, CI runner, or a
       CI build.
    
    3. Refreshing of permissions did not lead to the refreshed users being
       stuck to the primary. This could result in users not being able to
       access new resources for a brief moment of time, or them still being
       able to see old resources.
    
    To solve this some of the Grape related logic is handled by injecting EE
    specific modules in the right places. This ensures we can stick as early
    as possible, using the right data. The same technique is applied for
    various parts of the CI codebase.
    424c2771
helpers.rb 499 Bytes