Skip to content

Don't emit deprecation warnings on calls to the monitoring bulk API. (#39805)#39843

Merged
jpountz merged 2 commits intoelastic:7.0from
jpountz:backport/39805/7.0
Mar 11, 2019
Merged

Don't emit deprecation warnings on calls to the monitoring bulk API. (#39805)#39843
jpountz merged 2 commits intoelastic:7.0from
jpountz:backport/39805/7.0

Conversation

@jpountz
Copy link
Copy Markdown
Contributor

@jpountz jpountz commented Mar 8, 2019

The monitoring bulk API accepts the same format as the bulk API, yet its concept
of types is different from "mapping types" and the deprecation warning is only
emitted as a side-effect of this API reusing the parsing logic of bulk requests.

This commit extracts the parsing logic from _bulk into its own class with a
new flag that allows to configure whether usage of _type should emit a warning
or not. Support for payloads has been removed for simplicity since they were
unused.

@jakelandis has a separate change that removes this notion of type from the
monitoring bulk API that we are considering bringing to 8.0.

…lastic#39805)

The monitoring bulk API accepts the same format as the bulk API, yet its concept
of types is different from "mapping types" and the deprecation warning is only
emitted as a side-effect of this API reusing the parsing logic of bulk requests.

This commit extracts the parsing logic from `_bulk` into its own class with a
new flag that allows to configure whether usage of `_type` should emit a warning
or not. Support for payloads has been removed for simplicity since they were
unused.

@jakelandis has a separate change that removes this notion of type from the
monitoring bulk API that we are considering bringing to 8.0.
@jpountz jpountz merged commit 6f3578a into elastic:7.0 Mar 11, 2019
@jpountz jpountz deleted the backport/39805/7.0 branch March 11, 2019 06:59
hub-cap pushed a commit that referenced this pull request May 4, 2019
Removing of payload in BulkRequest (#39843) had a side effect of making
`BulkRequest.add(DocWriteRequest<?>...)` (with varargs) recursive, thus
leading to StackOverflowError. This PR adds a small change in
RequestConvertersTests to show the error and the corresponding fix in
`BulkRequest`.

Fixes #41668
hub-cap pushed a commit to hub-cap/elasticsearch that referenced this pull request May 22, 2019
Removing of payload in BulkRequest (elastic#39843) had a side effect of making
`BulkRequest.add(DocWriteRequest<?>...)` (with varargs) recursive, thus
leading to StackOverflowError. This PR adds a small change in
RequestConvertersTests to show the error and the corresponding fix in
`BulkRequest`.

Fixes elastic#41668
gurkankaymak pushed a commit to gurkankaymak/elasticsearch that referenced this pull request May 27, 2019
Removing of payload in BulkRequest (elastic#39843) had a side effect of making
`BulkRequest.add(DocWriteRequest<?>...)` (with varargs) recursive, thus
leading to StackOverflowError. This PR adds a small change in
RequestConvertersTests to show the error and the corresponding fix in
`BulkRequest`.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant