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

ScriptSession API to ensure snapshots/diffs of bindings are always consistent. #4145

Closed
Tracked by #2453
niloc132 opened this issue Jul 7, 2023 · 0 comments · Fixed by #4144
Closed
Tracked by #2453

ScriptSession API to ensure snapshots/diffs of bindings are always consistent. #4145

niloc132 opened this issue Jul 7, 2023 · 0 comments · Fixed by #4144

Comments

@niloc132
Copy link
Member

niloc132 commented Jul 7, 2023

Original title/topic: Generalize script session "deltas", probably by letting the script session entirely control snapshots internally, rather than expose this directly, such as by returning changes when running script code. This will also deal with some potential races, making it the script session implementation's responsibility to not lose track of changes.

Split off from #2453 to be its own issue.

This was found to be broken, where assigning/nulling a binding rapidly can break the application service's internal state, by missing changes and emitting inconsistent updates:

from deephaven_server import Server
s = Server()
s.start()

import time
from deephaven import empty_table, time_table

while True:
    t = time_table("PT1m")
    time.sleep(.04)
    t = None
    time.sleep(.04)

Usually takes 10s-1minute to fail.

@niloc132 niloc132 changed the title Generalize script session "deltas", probably by letting the script session entirely control snapshots internally, rather than expose this directly, such as by returning changes when running script code. This will also deal with some potential races, making it the script session implementation's responsibility to not lose track of changes. ScriptSession API to ensure snapshots/diffs of bindings are always consistent. Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant