-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make batch_conf option use user-friendly names if it's documented. #2185
Comments
|
We can just call it |
This has nothing to do with whether the word configuration is appropriate for an optarg name. |
Also, file suffixes and tool names follow a different kind of naming scheme -- just because an abbreviation there seems reasonable doesn't mean it would be reasonable in other contexts. |
I feel like we should flatten it. There is no reason to have a nested object. One possible choice for a user-friendly version would be |
How about batch_max_size, batch_max_rows, and batch_max_time? |
Presumably you get whichever comes first? That makes sense to me, I like that. |
How about |
In this case it's microseconds, so I'd rather spell it out to make it clear:
|
I'd prefer:
|
Err, may be not. Now that I typed it out, it's a bit weird. |
Actually, how about |
That's cool too, as long as the other ones are changed in the same way. I like that more. |
I like the most recent incarnation of this. We also need to add |
I also like the recent incarnation. What's |
We scale down the first batch to help with latency (so the first batch a cursor gets will be smaller than the other batches). This lets users show their users something as soon as possible. |
So the scaledown factor applies to all other constants (rows, bytes, microseconds)? In that case the name is ok IMO. |
I'm actually not 100% sure -- @danielmewes, what does the scaledown factor apply to? |
|
I guess there is no great name here, we just have to document things well. I think either of the two is fine (though I have a preference for |
That has negative associations I think we should avoid. Why is it a factor and not simply |
@srh: The main reason for it being a factor is that the batch size is already divided down internally, to account for the fact that we have multiple shards. Having the first batch size as a factor means that those size-reduction operations can just be chained together and we don't have to explicitly handle the first_batch_size when we go to the individual shards. It just makes the implementation simpler. We could certainly change that for a user facing API. If the user doesn't specify |
@danielmewes: That doesn't make any sense. At some point the first batch factor gets combined with the batch size on the first batch. That would require passing it down to the same place that the first batch size would have been passed down. |
@srh: Yes, but the factor is one value, while first_batch_size is four values (min_els, max_els, max_size, max_dur). |
@coffeemug It's not a lot of work. The question remains what we do if somebody specifies some of the options, but not the corresponding |
Actually, scaling the regular size parameters down by a hard coded factor unless the user overrides them through one of the |
I don't think we should scale it down by a hardcoded factor. I think we should just specify defaults for all these values. If the user changes some options, I'd leave the corresponding |
@coffeemug The problem is that users have to be aware of the existence of the |
Err, I see. What if we define missing |
Using the |
You know, I sort of think the scaledown factor might be better. It has the behavior you want if people don't bother to specify it (since it's a factor rather than a raw value), and I'm having trouble thinking of times when I want to adjust just one maximum value for the first batch. 4 options instead of 6 with more intuitive behavior seems like a win, especially since I think 3 of those 6 options would see very little use. The scaledown approach is also more flexible if we switch to some sort of smarter batch sizing in the future. (There's also the fact that it's already implemented.) |
I sort of disagree, but whatever you guys decide I wont stand in your way. |
It's an implementation detail option anyway, in the long run it'll change request-to-request, get increased until increasing it no longer speeds things up, or be specifiable live on the cursor. (Or we'll just have a push API.) |
Alright, let's just keep the scaledown factor. Marking as settled with these names:
|
Per #2185. ReQL tests are not patched yet, but it passes its unit tests.
@gchpaco -- in the future, please reference the relevant issue in the docs tracker so we don't forget to document the API in time for release. |
Whoops, sorry. |
For docs purposes, are the constraints strict? Or do we try to comply as much as possible only? If I use |
They're hints which the server is free to ignore. |
See rethinkdb/docs#248
max_els? max_dur? batch_conf?
All these abbreviations are cryptic, unprofessional-seeming, inconvenient for non-native speakers, and exude an aura of poor quality.
batch_conf should not have conf or configuration in its name at all, it's not configuration in any sense that other optargs aren't.
The text was updated successfully, but these errors were encountered: