You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For simplicity #11747 locks the whole spillable handle while it is spilling. This is because it wants to populate the spilled handle atomically w.r.t. the user trying to materialize the buffer. Why? Because we don't want to return an object on the device that is about to be removed, and we also need to make sure all the host-side objects are created and initialized in a thread safe way.
That said, this same lock is used to figure out if a handle is spillable:
Therefore a second thread trying to spill (asking each handle if they are spillable) is going to be blocked by a first thread that is currently in the synchronized block of spill. This synchronized block is long-running as it is held during IO. materialize should be blocked on the synchronized and it's OK if it has to wait for the IO, in my opinion. We can think about what it means to relax materialize synchronization w.r.t. IO later.
The desired solution makes spillable not depend on the IO happening in spill while keeping the state consistency needed such that a user calling materialize is able to get consistent state.
The text was updated successfully, but these errors were encountered:
For simplicity #11747 locks the whole spillable handle while it is spilling. This is because it wants to populate the spilled handle atomically w.r.t. the user trying to materialize the buffer. Why? Because we don't want to return an object on the device that is about to be removed, and we also need to make sure all the host-side objects are created and initialized in a thread safe way.
That said, this same lock is used to figure out if a handle is spillable:
Therefore a second thread trying to spill (asking each handle if they are
spillable
) is going to be blocked by a first thread that is currently in the synchronized block ofspill
. This synchronized block is long-running as it is held during IO.materialize
should be blocked on the synchronized and it's OK if it has to wait for the IO, in my opinion. We can think about what it means to relaxmaterialize
synchronization w.r.t. IO later.The desired solution makes
spillable
not depend on the IO happening inspill
while keeping the state consistency needed such that a user callingmaterialize
is able to get consistent state.The text was updated successfully, but these errors were encountered: