Ray objects immutability

How severe does this issue affect your experience of using Ray?

  • None: Just asking a question out of curiosity

Hi there,

I would like to ask about immutability of Ray objects. What are pros for keeping those immutable? What cons would be if those were mutable?

@sangcho, do you have any insight into this?

@yic, maybe you can leave a comment here?

If it is not immutable, it is much more difficult to synchronize the objects (e.g., whenever you mutate object,t all the objects in the cluster should be in sync).

This is also beneficial for lineage reconstruction (reexecute tasks to reconstruct the object) because immutability guarantees only the tasks can mutate the value of the object (and there’s no out of bound update)

@sangcho, thanks for your response. It makes sense to me.