Code Monkey home page Code Monkey logo

Comments (4)

consideRatio avatar consideRatio commented on June 6, 2024 1

I reproduced it once in 5.0.0b2 locally - and then failed to do so in additional attempts, but I think its related to a delay of the response as well - so doing it locally is harder but could perhaps be made reliably reproduced by using a "simulate slow internet" or similar as I think is available in chrome.

from jupyterhub.

minrk avatar minrk commented on June 6, 2024

Can you test this in 5.0b1? The admin page got lots of changes with the bootstrap 5 update, so it would be nice if this happened to get fixed along the way 🤞

from jupyterhub.

minrk avatar minrk commented on June 6, 2024

Thanks, I can reproduce it easily with 5.0b2 easily by adding time.sleep(0.25) to GET /users.

I think I have a rough idea - if two page fetches are outstanding at the same time, they cycle state changed between them:

  • click next - setOfset(10) - sets state offset=10, triggers updateUsers(offset: 10)
  • click next - setOfset(20) - sets state offset=20, triggers updateUsers(offset: 20)
  • first response comes in - sets offset(10), which is different from offset=20, triggers updateUserr
  • repeat with 20/10/20/10/etc.

The problem ultimately stems from the fact that setting the offset state is what triggers the request, but the response also sets the offset state.

If clicking the pagination button triggered the request without setting the state, I think this wouldn't happen, similarly if the reply populated the UI without changing the state, that would also work.

The alternative is some kind of lock to prevent more than one outstanding request at a time.

from jupyterhub.

minrk avatar minrk commented on June 6, 2024

#4815 fixes this by breaking the cycle

from jupyterhub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.