-
Notifications
You must be signed in to change notification settings - Fork 22
Timing Issue in the Splunk_Job class #34
Comments
Hi @narkaTee, Updating Would you be willing to submit a pull request against the develop branch? |
Hi @shakeelmohamed, I'll look into this when I find some free time. But the current |
Hi @shakeelmohamed, I have a version which completes all test except one.
For some reason the I tracked the problem down but I don't know how to solve it. What happens is: The Is there a reason why the title is used for the path? I've build a "workaround" in the bug/collectionlist branch. |
Thanks for investigating this @narkaTee! I looked at your fix (https://github.com/narkaTee/splunk-sdk-php/commit/289720cbfcfe499dce487dd29c8882f1fb3dafad) for this specific issue, which seems reasonable. I think this fix https://github.com/narkaTee/splunk-sdk-php/commit/16415aaff59d6f94dbf4540f1b0262548fda79ff is not what we want. Not every |
ah okay I totally overlooked the
Did you mean I moved the modified |
I think 2fb6301 is not really solving the problem, but fe2384a seems like a good solution. Jobs will have a SID unless they're run with oneshot or blocking mode (see the REST API docs for more details). When you're ready, open a pull request against the develop branch. It will be easier to review your changes that way instead of commit by commit 😄 |
Hi,
I've found an issue in the fetch method of the
Splunk_Job
class.If you try to run a complex search query and/or the searchhead is under heavy load a query can stay in the Queued or Parsing dispatchState for longer than ~1 second which leads to an
Splunk_HttpException
with the Error Message "HTTP 200 OK".The Problem occurs if you run the search async like in this example.
The method calls
isDone
,getProgress
andrefresh
are possible triggers as well as any other method invoking a method which callsSplunk_Job->fetch
.There are multiple ways (increase timeout, increase number of retries...) how to work around this issue but to properly resolve it a proper
isReady
method should be implemented and used.For example see how the python sdk implemented this:
is_ready method
usage of this method (just ignore the missing call to sleep before pass command ;))
It's an elegant solution. Whats your opinion?
The text was updated successfully, but these errors were encountered: