Commit Detail
Commit 82d96dc
Create primaryStub and deprecate 'primary' field.
The 'primary' field name is confusing, as it is easy to read
code like
if (!this.ctx.storage.primary)
and assume it's a boolean, not a stub. you might think the
above is a test to make sure we're not the primary, but
because the primary stub is set only on replicas, it's the
opposite!
if (!this.ctx.primaryStub)
is easier to read and understand that this is an 'if' checking
if we're the primary.
This change also moves the registration location to be outside
of .ctx.storage.
X-Dest-Branch: jolio/add-ctx-primaryStub