Граф коммитов

486 Коммитов

Автор SHA1 Сообщение Дата
Richard Park 26a1d8435e ID() 2021-08-03 00:16:51 +00:00
Richard Park fa1b408451 - Adding in a simple stress test that can run through the recovery code in a realistic way.
- Adjusting tests to handle the link ID
- Changing Recover() so I don't break the public facing API by breaking it apart into an internal version and a public facing one. (the internal one let's us pass in the expected link ID to avoid the expensive recovery)
2021-08-03 00:14:02 +00:00
Richard Park 72f6fc158b Updating go-amqp dependency, doing `go mod tidy`. 2021-08-02 21:11:46 +00:00
Richard Park e6be745f52 Fix compile error 2021-07-31 01:45:19 +00:00
Richard Park fe9b73659a Recreating fix. Basically - if the link has already swapped out by the time Recover() runs we don't need to recover again.
And if we do need to recover, we should try to just recreate the link first, and not the entire connection since that's more expensive.
2021-07-31 01:44:11 +00:00
Richard Park f16940d69e
Merge pull request #229 from richardpark-msft/eh-changelog
As part of #216 we added in some features that needed to be documented in the readme and changelogs.

There are no code changes in this, it's purely documentation.
2021-07-20 12:10:15 -07:00
Richard Park 476d53132e Removing unneeded import (other snippets don't) 2021-07-20 19:07:43 +00:00
Richard Park 7a0c7825fd Updating changelog and readme to accomodate the new sender retry options. 2021-07-20 19:02:04 +00:00
Richard Park 8411df33dc
Allow for a sender retry cap #226
As part of the work @jhendrixMSFT added for recovering sender links we also wanted to allow the customer to cap the # of retries (currently it's infinite so long as the errors are considered retryable).

This PR allows that by exposing a new option as part of the event hub client that allows you to specify the max retry count. It's a small step to also allow configuring the underlying backoff policy details as well but I've purposefully not done that so we can take some time to discuss a possible design for retry policies.

Fixes #216
2021-07-16 15:12:09 -07:00
Richard Park 266555a745 There's a missing assert in the races_test.go 2021-07-16 21:52:10 +00:00
Richard Park 7b5a75bdcd Remove unused import 2021-07-16 20:22:20 +00:00
Richard Park 3042812d74 Idiom: don't check for nil retryOptions. 2021-07-16 20:20:48 +00:00
Richard Park aefb43824c Addressing feedback from jhendrix:
- Default to infinite retries to be backwards compatible with our previous change
- Document that < 0 is a valid value and indicates infinite retries.
2021-07-16 20:06:19 +00:00
Richard Park 2235a9da19 Merge remote-tracking branch 'upstream/master' into eh-retry
(Joel had moved the concurrency tests)
2021-07-15 23:18:01 +00:00
Richard Park e2af248b76 Exposing the sender max retry count option up through the Hub. 2021-07-15 23:13:33 +00:00
Richard Park b14a48da1f Moving interfaces into the right spot 2021-07-15 22:15:20 +00:00
Richard Park 18d04e758b Adding in ability to control max retry count and adding in tests 2021-07-15 22:13:33 +00:00
Joel Hendrix 03123a928b
Enable race detection in integration tests (#224)
* Enable race detection in integration tests

Move tests specific to race detection to their own source file under the
race build tag.
Removed error checking for concurrent test and updated comment.

* add missing target

* add missing test case reporting

* check for error on Recover()
2021-07-15 14:59:46 -07:00
Richard Park 6e9e517e48
Memory persister fail-passes with an empty checkpoint store #223
The MemoryPersister would return an error and a "beginning of stream" Checkpoint if a checkpoint didn't yet exist for a partition. Any code that was expecting the error to take precedence would fail. This was causing the basic sample in the readme to fail even though nothing was actually wrong.

This PR removes the error and documents a bit more of the internals with some tests.
2021-07-14 17:37:49 -07:00
Richard Park 688c242b4c Revert changes to the hub tests. 2021-07-15 00:30:25 +00:00
Richard Park c6b753f0c2 Extending to see what the actual timeout needs to be (or if it we're actually deadlocking!) 2021-07-14 23:59:59 +00:00
Richard Park bb2faa3472 Give the connection recovery test slightly longer to run. 2021-07-14 23:42:37 +00:00
Richard Park b628995743 Give the connection recovery test slightly longer to run. 2021-07-14 23:37:38 +00:00
Richard Park f82643d9c4 fmt 2021-07-13 19:18:27 -07:00
Richard Park 693cc78601 Merging with my previous change. This one covers the branches that devigned pointed out in receiver.go. 2021-07-13 19:09:38 -07:00
Richard Park 2b1e9f8aee Fixing a bug where the readme snippet doesn't work - the main issue is that the memory persister was returnning an error when the checkpoint didn't exist. The other stores all treat this as a "go ahead and initialize a new checkpoint" so this is only an issue with the memory persister.
I've added some tests in to get better confidence around it (and to document what filters you do end up with). For the most part we can fall back to just using the same non-inclusive filter for everything offset based since offsets can't be negative

Also, the tf file doesn't work with the latest terraforms so I've adjusted it like the service bus one.
2021-07-13 19:07:35 -07:00
Richard Park b68e673cd1 Fix formatting in my own test! 2021-07-12 16:10:18 -07:00
Richard Park 0cdb7551bd Adding in a test 2021-07-12 15:01:33 -07:00
Richard Park e1e934b0ee (p *MemoryPersister) Read() was returning both an error and a valid value.
The error, as far as I can tell, is "accurate" but totally unneeded as the rest of the code can handle the checkpoint just fine.

This was blowing up the basic sample from the readme, even if you did everything correctly.
2021-07-12 14:50:55 -07:00
Joel Hendrix 0eb7b61636
Fix sender.Recover() to be goroutine safe (#218)
* Fix sender.Recover() to be goroutine safe

Tidy go.sum

* add tracing to recovery code

* honor context while sleeping

* add comments detailing limitations

* add concurrency test

fix hang when test misbehaves
2021-07-07 19:01:53 -07:00
Joel Hendrix d9338b76d3
Skip calling sender.Recover() for some errors (#219)
* Skip calling sender.Recover() for some errors

For transient errors where we know the connection is good, don't
Recover() the connection as that doesn't really help.

* Add missing break
2021-07-07 11:40:18 -07:00
catalinaperalta 717fe444f2
Merge pull request #213 from catalinaperalta/master
return the error from getting the old checkpoint
2021-05-19 16:05:23 -07:00
Catalina Peralta 7dcc462fc7 return the error from getting the old checkpoint 2021-05-14 15:13:56 -07:00
catalinaperalta ae5acc7f0f
Merge pull request #211 from catalinaperalta/master
get checkpoint from specified consumer group
2021-05-14 13:23:35 -07:00
Catalina Peralta b2c1f965b1 improve checkpoint comparison 2021-05-11 08:27:51 -07:00
Catalina Peralta b92b698885 update version.go and changelog 2021-05-07 15:24:24 -07:00
Catalina Peralta d186b09e6d get checkpoint from specified consumer group 2021-05-07 15:22:19 -07:00
catalinaperalta 9c3a641339
Merge pull request #207 from danielrbradley/eph-default-checkpoint
Allow customisation of initial checkpoint
2021-05-04 15:45:49 -07:00
Daniel Bradley f6b68fbaaa Allow customisation of initial checkpoint
Document change in changelog
2021-04-30 20:05:55 +01:00
catalinaperalta ce20d7ad53
Merge pull request #208 from catalinaperalta/master
Update readme quick start
2021-04-23 16:21:20 -07:00
Catalina Peralta 2de66dafab update readme quick start 2021-04-22 18:05:39 -07:00
catalinaperalta 94590f4a15
Merge pull request #199 from nicolasGab/feature/WithEventhubInfoInBlobPath
Feature/with eventhub info in blob path
2021-03-11 15:42:20 -08:00
Nicolas Gaborel 74557b9260 Use a generic option function to prefix blob path 2021-03-09 11:16:16 +01:00
Nicolas Gaborel cdfaaf81a0 Update changelog and version file 2021-03-05 09:21:06 +01:00
Nicolas Gaborel 28dc0b0703 🎨 Use a string formatter to build the blob path 2021-03-02 18:02:17 +01:00
Nicolas Gaborel aa1be2f753
Merge branch 'master' into feature/WithEventhubInfoInBlobPath 2021-03-02 11:56:27 +01:00
catalinaperalta 7b808b37a5
Merge pull request #205 from princjef/receiver-block
Unblock receiver goroutine on shutdown
2021-02-11 10:32:16 -08:00
Jeff Principe f043fdccb8 Unblock receiver goroutine on shutdown 2021-02-05 15:48:20 -08:00
catalinaperalta f421926556
Merge pull request #203 from rwngallego/master
Remove check for temporary network errors
2021-01-22 17:41:02 -05:00
Rowinson Gallego de0141fe51 Remove check for temporary network errors 2021-01-22 23:24:04 +01:00