Onyx-Protocol / Onyx

Onyx
https://Onyx.org
GNU Affero General Public License v3.0
1.79k stars 362 forks source link

net/http/authz: use stale read in Delete #1422

Closed jbowens closed 7 years ago

jbowens commented 7 years ago

The Delete method does a read-modify-write so the read doesn't need to be linearizable. If it reads a stale value, the IfNotModified condition will fail the sinkdb operation.

By avoiding a consensus round on every call to Delete we also bring down deleteGrantsByAccessToken's # of consensus rounds from n + 1 to 1, where n is the number of policies.

tessr commented 7 years ago

👀

tessr commented 7 years ago

LGTM