Page MenuHomePhabricator

Prevent write queries from executing on "r" connections in LiskDAO
Open, Needs TriagePublic

Description

There is currently this comment in the LiskDAO class:

// TODO: There is currently no protection on 'r' queries against writing.

If this is still the case, this seems worthwhile fixing. If I understand correctly, there is currently nothing preventing writes on database connections established with establishConnection('r').

Event Timeline

joshuaspence raised the priority of this task from to Needs Triage.
joshuaspence updated the task description. (Show Details)
joshuaspence added a project: Infrastructure.
joshuaspence added a subscriber: joshuaspence.

Yep, this is correct. Context is that there's no difference today between 'r' and 'w' connections. Distinguishing between them (primarily so we can send some reads to a replica) has always been a theoretical far-future goal, and I think we're mostly consistent about connection use in practice, so this piece hasn't been built yet. Building it would make eventual replica reads easier.

epriestley renamed this task from Add write protection for LiskDAO to Prevent write queries from executing on "r" connections in LiskDAO.Jun 15 2015, 1:05 PM

(Just clarifying the title since I thought "write protection" might mean something like makeEphemeral().)

eadler added a project: Restricted Project.Aug 5 2016, 5:24 PM