Version: v2.1.1+incompatible Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2017 License: BSD-3-Clause Imports: 8 Imported by: 0



Package masterbuffer contains experimental logic to buffer master requests in VTGate. Only statements outside of transactinos will be buffered (including the initial Begin to start a transaction).

The reason why it might be useful to buffer master requests is during failovers: the master vttablet can become unavailable for a few seconds. Upstream clients (e.g., web workers) might not retry on failures, and instead may prefer for VTGate to wait for a few seconds for the failover to complete. Thiis will block upstream callers for that time, but will not return transient errors during the buffering time.



This section is empty.


This section is empty.


func FakeBuffer

func FakeBuffer(target *querypb.Target, inTransaction bool, attemptNumber int) error

FakeBuffer will pretend to buffer master requests in VTGate. Requests *will NOT actually be buffered*, they will just be delayed. This can be useful to understand what the impact of master request buffering will be on upstream callers. Once the impact is measured, it can be used to tweak parameter values for the best behavior. FakeBuffer should be called before a potential VtTablet Begin, otherwise it will increase transaction times.


This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL