Skip to content

Update watch delay increment to 50ms#55

Open
MikeGoldsmith wants to merge 3 commits into
couchbaselabs:masterfrom
MikeGoldsmith:patch-1
Open

Update watch delay increment to 50ms#55
MikeGoldsmith wants to merge 3 commits into
couchbaselabs:masterfrom
MikeGoldsmith:patch-1

Conversation

@MikeGoldsmith

@MikeGoldsmith MikeGoldsmith commented Oct 31, 2016

Copy link
Copy Markdown
Contributor

Updated the increment amount to 50ms for watch index retry delay.

The sentence indicates starting at 50ms with an upper bound of 1000ms but originally had the increment set at 500ms, which would only allow 2 increments before the upper bound was reached.

@daschl

daschl commented Mar 15, 2017

Copy link
Copy Markdown
Contributor

@MikeGoldsmith looks like a good improvement, I think we need full +1 from all owners so we can merge this (double check with the impls and if not conform file tickets).

edit: I just checked, and java indeed uses 500 ->

private static final Delay INDEX_WATCH_DELAY = Delay.linear(TimeUnit.MILLISECONDS, 1000, 50, 500);

ping @couchbaselabs/sdk-team

@mnunberg

mnunberg commented Mar 16, 2017

Copy link
Copy Markdown
Contributor

Python:

    def n1ql_index_watch(self, indexes,
                         timeout=30, interval=1, watch_primary=False):

Python uses a fixed single-second interval, but this is easy to adjust by the user at a per-operation level. I haven't yet got around to implementing a lower/upper bound.

@MikeGoldsmith

Copy link
Copy Markdown
Contributor Author

.NET currently uses a fixed 50ms interval

private static readonly TimeSpan WatchIndexSleepDuration = TimeSpan.FromMilliseconds(50);

@daschl

daschl commented Mar 21, 2017

Copy link
Copy Markdown
Contributor

@couchbaselabs/sdk-team heads up! 🔥

  • Java
  • .NET
  • Node
  • PHP
  • Python
  • Go
  • C

@daschl

daschl commented Mar 21, 2017

Copy link
Copy Markdown
Contributor

@MikeGoldsmith the only thing that might make sense is in additon to add an explicit "errata" to the rfc at the end which mentions this change.

@mnunberg

Copy link
Copy Markdown
Contributor

While this might be out-of-scope for this RFC, what's the recommended retry interval for clients which don't use a linearly increasing interval?

@MikeGoldsmith

Copy link
Copy Markdown
Contributor Author

@daschl @mnunberg I've added a proposed static delay of 200ms if an increasing delay is not possible and added the errata section to describe changes

Comment thread rfc/0003-indexmanagement.md Outdated
# Errata
1. 18th April 2017
- Update index watch retry increment from 500ms to 50ms
- Add static watch index retry interval of 250ms if linear retry increments is not available

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

250/200ms?

@avsej
avsej force-pushed the master branch 2 times, most recently from cc991a8 to 8b3b33d Compare June 23, 2017 17:12
@MikeGoldsmith

Copy link
Copy Markdown
Contributor Author

@daschl I believe this is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants