Skip to content

Commit

Permalink
Revert "Add follower read documentation"
Browse files Browse the repository at this point in the history
  • Loading branch information
ecordell committed Dec 6, 2021
1 parent 74aec57 commit 53ab33c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cmd/spicedb/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ func registerServeCmd(rootCmd *cobra.Command) {
serveCmd.Flags().Duration("datastore-gc-interval", 3*time.Minute, "amount of time between passes of garbage collection (postgres driver only)")
serveCmd.Flags().Duration("datastore-gc-max-operation-time", 1*time.Minute, "maximum amount of time a garbage collection pass can operate before timing out (postgres driver only)")
serveCmd.Flags().Duration("datastore-revision-fuzzing-duration", 5*time.Second, "amount of time to advertize stale revisions")
// See crdb doc for info about follower reads and how it is configured: https://www.cockroachlabs.com/docs/stable/follower-reads.html
serveCmd.Flags().Duration("datastore-follower-read-delay-duration", 0*time.Second, "amount of time to subtract from non-sync revision timestamps to ensure they are sufficiently in the past to enable follower reads (cockroach driver only)")
serveCmd.Flags().Duration("datastore-follower-read-delay-duration", 0*time.Second, "amount of time to use as a delay to enable follower reads (cockroach driver only)")
serveCmd.Flags().String("datastore-query-split-size", common.DefaultSplitAtEstimatedQuerySize.String(), "estimated number of bytes at which a query is split when using a remote datastore")
serveCmd.Flags().StringSlice("datastore-bootstrap-files", []string{}, "bootstrap data yaml files to load")
serveCmd.Flags().Bool("datastore-bootstrap-overwrite", false, "overwrite any existing data with bootstrap data")
Expand Down
2 changes: 1 addition & 1 deletion internal/datastore/crdb/crdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func (cds *crdbDatastore) Revision(ctx context.Context) (datastore.Revision, err
}

// Round the revision down to the nearest quantization
// Apply a delay to enable follower reads: https://www.cockroachlabs.com/docs/stable/follower-reads.html
// Apply a delay to enable historial reads
crdbNow := nowHLC.IntPart() - cds.followerReadDelayNanos
quantized := crdbNow
if cds.quantizationNanos > 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/datastore/crdb/crdb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func TestCRDBDatastoreWithFollowerReads(t *testing.T) {
100 * time.Millisecond,
}
for _, quantization := range quantizationDurations {
t.Run(fmt.Sprintf("Quantization%s", quantization), func(t *testing.T) {
t.Run(fmt.Sprintf("followReadDelayWithQuantization%s", quantization), func(t *testing.T) {
require := require.New(t)

tester := newTester(crdbContainer, "root:fake", 26257)
Expand Down

0 comments on commit 53ab33c

Please sign in to comment.