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

JoinValueLane.remove(key) occasionally fails #110

Open
brohitbrose opened this issue Apr 3, 2023 · 0 comments
Open

JoinValueLane.remove(key) occasionally fails #110

brohitbrose opened this issue Apr 3, 2023 · 0 comments
Labels
A-agent Area: web agents A-downlink Area: downlinks C-bug Category: bug

Comments

@brohitbrose
Copy link
Member

brohitbrose commented Apr 3, 2023

Has been observed very sporadically. Needs more experimentation to determine whether the underlying downlink properly gets closed, or if the lane simply contains the last value. Unfortunately this seems to be very hard to reproduce.

The JoinValueLanes that observed this behavior used String keys and Long keys, and pojo values whose Forms cast non-distinct Items to null -- if that happens to make a difference. When the issue happens, it can be observed both on the server side and on the client side:

  • Server side: after remove() is invoked and fails, iterate over the lane. The lane will still report null values under the keys, rather than the expected behavior of not revealing those keys in the first place.
  • Client side: downlinking to the lane reveals the keys present but without any corresponding values, e.g. using swim-cli might return @update(key:2313084330).

Note that for a given lane, it is possible that the first happens but not the second. I'm not sure whether the second can happen without the first.

It is a JoinValueLane.remove() problem because the following logic is present in a sample app:

  @SwimLane("unsubscribe")
  private CommandLane<String> unsubscribe = this.<String>commandLane()
      .onCommand(uri -> {
        this.statuses.remove(uri);
        final String k = uri.substring("/submission/".length());
        this.reviewed.remove(k);
        this.answered.remove(k);
        this.unanswered.remove(k);
        this.unreviewed.remove(k);
      });

where statuses is a JVL, and the remainder are MapLanes. The MapLanes always update correctly.

Possibly related to #107.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-agent Area: web agents A-downlink Area: downlinks C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant