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

457 Коммитов

Автор SHA1 Сообщение Дата
richardpark-msft 24a55158e5 Update with the correct version number 2021-08-16 17:30:00 -07:00
richardpark-msft fa1fdd1d73 empty commit 2021-08-16 16:38:30 -07:00
richardpark-msft fe908f327f Fix spelling mistake 2021-08-16 16:25:37 -07:00
richardpark-msft b3cb1b921c Updating changelog with PR 2021-08-16 16:10:26 -07:00
richardpark-msft 329b8caa5d Using new option in go-amqp that lets us keep the link alive, even when we get disposition errors.
From what we've seen disposition errors are not link-ending errors. One of the more common ones is when the service indicates that you are being throttled.

_Some_ sends will complete (and some will fail) but closing the link means we can't tell which are which.
2021-08-16 16:03:16 -07:00
Richard Park 3d81e00128
Adding in a sample using EventHubs with OpenCensus #233
Adding in an Event Hubs sample that shows how to integrate with OpenCensus.
2021-08-10 16:46:26 -07:00
richardpark-msft e45ed571f9 empty commit 2021-08-10 16:36:30 -07:00
Richard Park 833a40726b Merge branch 'eh-logging-sample' of github.com:Azure/azure-event-hubs-go into eh-logging-sample 2021-08-04 22:48:18 +00:00
Richard Park bf5b15cb31 rebuild 2021-08-04 22:48:12 +00:00
Richard Park b44410bf57
Merge branch 'master' into eh-logging-sample 2021-08-04 15:08:55 -07:00
Richard Park d65a4e3721 Let's go ahead and comment the blank lines too... 2021-08-04 20:41:30 +00:00
Richard Park 8b838e2dd1 Creating a sample to show how to activate logging within EventHubs using OpenCensus 2021-08-04 20:36:43 +00:00
Richard Park b794b15677
Merge pull request #232 from Azure/recovery-changes
The recovery algorithm could get into a cycle where two goroutines could continue to recover, even when a new link was in place. This can cause a lot of thrash since each recovery of the link will interrupt any in-progress sends, causing even more recoveries, etc...

This PR fixes that by checking the link ID that we are trying to recycle. If it doesn't match then the link must already have been recovered so we can no-op and early return.
2021-08-03 12:39:14 -07:00
Richard Park 4a2d1e6e23 force rebuild 2021-08-03 19:33:21 +00:00
Richard Park c257820f32 Rename file to match what it does and add in comments for linting. 2021-08-03 18:17:03 +00:00
Richard Park b3e3b9b4fb Comment no longer applies. Will need to revisit in the future. 2021-08-03 18:14:42 +00:00
Richard Park 74c90a77d5 Add in some tests for block 1 of the recovery code.
Not perfect (maybe even repulsive) but they work and can support us for more changes later.
2021-08-03 06:22:58 +00:00
Richard Park 0ce0412a84 Removing the code that tries to minimally recreate the link. newSessionAndLink is a little too modest about it's capabilities - it also creates a new connection.
This part wasn't the highest value for recovery compared to just skipping recovery altogether if the link had cycled, so for now I'll just remove it and replace it with a TODO.
2021-08-03 02:32:34 +00:00
Richard Park ee14f14fcd Added test that shows ErrLinkClosed vs ErrLinkDetached 2021-08-03 01:30:11 +00:00
Richard Park 489579cbd9 If the expectedLinkID is empty we just skip the ID check altogether and fallback to the normal recovery checks. 2021-08-03 01:20:28 +00:00
Richard Park 26a33e68d8 Update changelog with fix we just made. 2021-08-03 00:25:54 +00:00
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