-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Throttler does not prevent additional threads from performing parallel requests #9
Comments
Yeah actually I've noticed this limitation from the very beginning. Because MW doesn't suggest you to access MW API too frequently, and trottling will actually enforce actions (edits, at least) performed in series. But things can be a little bit different if you'are working with multiple MW sites, and I can try to implement the trottling per site logic using asynchronous semaphore or something. However, I still think it would be better if such trottling/queuing logic can be imeplemented in the client-side code, because you can control the speed that you produce the edit requests. Suppose there are a lot of page-editing requests queued up, considering the trottling delay before each edit request, it may take considerable time to finish up all the edit requests. On the one hand, it may take too much memory to hold all the impending edits; on the other hand, if other users happen to edit the page during the (long) delay before your client actually send the edit request, an edit conflict will happen; though this can be detected by |
Memory is a valid point, but if the client |
So now I have introduced a Btw I decided to make some adjustments on namespace organizations, so |
No worries with the namespace/class renaming, since this is still a 0.x release, and therefore is implied to be non-final. (semver is a thing though, and nuGet like every package manager respects the standard. Post version 1.0, it's definitely something to adhere to. Devs can get cranky. ) Good to see the throttler improvements up, I'll let you know how it goes the next time I need to perform a job on the wiki. |
I just feel assured that 0.x implication actually holds :-) Okay, then just help yourself, and re-open this issue if something goes wrong. |
While debugging I noticed that the built in throttler is simply a delay before any 'edit' tier modification is performed, meaning that numerous threads could end up submitting changes to a MediaWiki API at the same time.
Additionally,
FilePage.UploadAsync
does not utilise throttling at all.It should be possible to implement an inter-thread throttler without introducing any breaking changes.
The text was updated successfully, but these errors were encountered: