diff --git a/NOTICE.txt b/NOTICE.txt index 15f46e7c6b39..682b66e8bd26 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4863,8 +4863,8 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------- Dependency: github.com/Shopify/sarama -Version: v1.23.1 -Revision: 46c83074a05474240f9620fb7c70fb0d80ca401a +Version: v1.23.1-elastic +Revision: 71dcfe72351b8daf910276a46540ca0b7bbe0a2b License type (autodetected): MIT ./vendor/github.com/Shopify/sarama/LICENSE: -------------------------------------------------------------------- diff --git a/vendor/github.com/Shopify/sarama/broker.go b/vendor/github.com/Shopify/sarama/broker.go index 9c3e5a04a8a7..aafd38c7d7ec 100644 --- a/vendor/github.com/Shopify/sarama/broker.go +++ b/vendor/github.com/Shopify/sarama/broker.go @@ -387,6 +387,23 @@ func (b *Broker) FetchOffset(request *OffsetFetchRequest) (*OffsetFetchResponse, return nil, err } + // In new consumer group / partition pairs, Microsoft's Azure Event Hubs + // communicates the "no error / new offset" state by omitting the requested + // entries from the OffsetFetchResponse (in contrast to other implementations + // which indicate this by returning an explicit offset of -1). To handle this + // case, we check all entries in the request and add an offset to the response + // table for any that are missing. + for topic, partitions := range request.partitions { + if response.Blocks[topic] == nil { + response.Blocks[topic] = make(map[int32]*OffsetFetchResponseBlock) + } + for _, p := range partitions { + if response.Blocks[topic][p] == nil { + response.Blocks[topic][p] = &OffsetFetchResponseBlock{Offset: -1} + } + } + } + return response, nil } diff --git a/vendor/github.com/Shopify/sarama/dev.yml b/vendor/github.com/Shopify/sarama/dev.yml new file mode 100644 index 000000000000..3f4d569e173f --- /dev/null +++ b/vendor/github.com/Shopify/sarama/dev.yml @@ -0,0 +1,10 @@ +name: sarama + +up: + - go: + version: '1.12' + +commands: + test: + run: make test + desc: 'run unit tests' diff --git a/vendor/vendor.json b/vendor/vendor.json index 3fd6f0a32875..75ebb6dd5f9b 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -183,13 +183,14 @@ "revisionTime": "2018-07-23T16:30:02Z" }, { - "checksumSHA1": "w5NkRQ2Cebz7a6UfrbwFdhyRWnM=", + "checksumSHA1": "qrdmO04N/Fb0BvrohZecpjMbcU0=", + "origin": "github.com/elastic/sarama", "path": "github.com/Shopify/sarama", - "revision": "46c83074a05474240f9620fb7c70fb0d80ca401a", - "revisionTime": "2019-07-22T18:01:16Z", + "revision": "71dcfe72351b8daf910276a46540ca0b7bbe0a2b", + "revisionTime": "2019-11-24T15:23:03Z", "tree": true, - "version": "v1.23.1", - "versionExact": "v1.23.1" + "version": "v1.23.1-elastic", + "versionExact": "v1.23.1-elastic" }, { "checksumSHA1": "Te1xRugxHQMAg7EvbIUuPWm8fvU=",