forked from nats-io/nats-server
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rebase rivian fork 2.10.3 with main. #1
Open
Codecheetos2023
wants to merge
2,829
commits into
rivian:main
Choose a base branch
from
nats-io:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
Although we probably don't want too many different node sizes here, the `node10` case is particularly interesting because it perfectly fits the full 0-9 numeric range without wasting bytes. In fact it saves 96 bytes (208 bytes instead of 304) compared to using `node16` for the same purpose. This means memory savings for tracking subjects which are either mostly numerical throughout, or have tokens that are primarily numerical. For a subject space that is mostly numerical, this can be several GBs less at the half-billion subjects mark and the saving can grow above that. Signed-off-by: Neil Twigg <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
A stream move could be completed when looking at the stream info, but the meta leader could still deny move updates for a short time while state is cleaned up (i.e. the old peers are not removed yet). This doesn't happen often locally, but would happen more when running in CI. Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
…#6073) If we are leader and store two entries, the first having quorum and being committed/applied and the second not having quorum. A new leader should be able to truncate the second entry. That was not possible before as the `n.loadEntry(ae.pindex)` and `n.truncateWAL(eae.pterm, eae.pindex)` combination would remove two entries, not just one. We now check if the entry stored at `ae.pindex` has a matching term with `ae.pterm`, if so we can truncate entries past that point and then simply continue storing that append entry. Instead of needing to truncate, stop, get a heartbeat, start catchup, get the same append entry again, store it, get the next entry, stop catchup, etc. In this case we can now just, truncate and store. Signed-off-by: Maurice van Veen <[email protected]>
) Resolves #6085 With two messages, one being scheduled to be redelivered after max backoff, and another new message that just came in. The new message would only be redelivered after the max backoff due to the first message having set the timer as such. Make sure that we can reset the pending timer to trigger earlier in this scenario. Signed-off-by: Maurice van Veen <[email protected]>
Although we probably don't want too many different node sizes here, the `node10` case is particularly interesting because it perfectly fits the full 0-9 numeric range without wasting bytes. In fact it saves 96 bytes (208 bytes instead of 304) compared to using `node16` for the same purpose. This means memory savings for tracking subjects which are either mostly numerical throughout, or have tokens that are primarily numerical. For a subject space that is mostly numerical, this can be several GBs less at the half-billion subjects mark and the saving can grow above that. Signed-off-by: Neil Twigg <[email protected]>
We also no longer register pre-acks when we detect this from a consumer snapshot since we properly handle this now and this could lead to excessive memory usage. Signed-off-by: Derek Collison <[email protected]>
Signed-off-by: Derek Collison <[email protected]>
Signed-off-by: Derek Collison <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
…e. (#6109) Detect if we receive an ack past our last stream sequence. We also no longer register pre-acks when we detect this from a consumer snapshot since we properly handle this now and this could lead to excessive memory usage. Signed-off-by: Derek Collison <[email protected]>
When a `DeleteRange` was used to mark deletes, when looping over it with `dr.Range(..)` it would delete one message too much. Compared with a `DeleteSlice` the `DeleteRange` also didn't return the correct `last` for `dr.State()`. Also being +1 what it should be. Signed-off-by: Maurice van Veen <[email protected]>
This optimises #6089 by ensuring that we don't over-walk either the sublist or the subject tree, instead only matching the subject tree on subjects for which the sublist expresses interest. Signed-off-by: Neil Twigg <[email protected]>
This optimises #6089 by ensuring that we don't over-walk either the sublist or the subject tree, instead only matching the subject tree on subjects for which the sublist expresses interest. On my machine, in the `JetStreamConsumeWithFilters` benchmark with `-benchtime 1000x`, this reduces the CPU time taken by `NumPendingMulti` by 19.41 seconds, reducing it to only 0.06 seconds. Signed-off-by: Neil Twigg <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
After round of feedback, few changes were requested: **Fix unpin advisory name** Copy-paste mistake was made in unpin advisory name. **Fix PinnedTS** It was meant to return time when pinned happened, not the daedline. **Add check for group name** As the ADR for Priority Groups was [also updated](nats-io/nats-architecture-and-design#311) after feedbach, this PR implements that. cc @ripienaar @jnmoyne Signed-off-by: Tomasz Pietrek <[email protected]> --------- Signed-off-by: Tomasz Pietrek <[email protected]>
…am update for the configuration, likely the server was able to accomplish the move, right after, the test will assert that C2 is the stream was placed in the correct cluster Signed-off-by: Alberto Ricart <[email protected]>
test(flapper): fix TestJetStreamJWTMove - by removing a check on stream update for the configuration, likely the server was able to accomplish the move, right after, the test will assert that C2 is the stream was placed in the correct cluster Signed-off-by: Alberto Ricart <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
Using `crand` was unpredictable because it might produce bytes that are a valid subject and therefore we wouldn't notice the problem in `recoverFullState`. Dropping in a UTF-8 rune error trips the detection always and is therefore more reliable. Signed-off-by: Neil Twigg <[email protected]>
…nment If we are reassigning a stream assignment to a different placement, i.e. due to insufficient resources or another placement error, then don't process any further stream assignment results until the new assignment is processed. Otherwise we might generate multiple new assignments unnecessarily which could delete/recreate/update the stream multiple times, potentially on different peer sets. This should also de-flake `TestJetStreamSuperClusterConcurrentOverflow`. Signed-off-by: Neil Twigg <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Using `crand` was unpredictable because it might produce bytes that are a valid subject and therefore we wouldn't notice the problem in `recoverFullState`. Dropping in a UTF-8 rune error trips the detection always and is therefore more reliable. Signed-off-by: Neil Twigg <[email protected]>
…nment (#6121) If we are reassigning a stream assignment to a different placement, i.e. due to insufficient resources or another placement error, then don't process any further stream assignment results for that stream until the new assignment is processed. Otherwise we might generate multiple new assignments unnecessarily which could delete/recreate/update the stream multiple times, potentially on different peer sets. This should also de-flake `TestJetStreamSuperClusterConcurrentOverflow`. Signed-off-by: Neil Twigg <[email protected]>
`mset.noInterest(..)` mentions it requires a write lock to be held: ```go // Check if there is no interest in this sequence number across our consumers. // The consumer passed is optional if we are processing the ack for that consumer. // Write lock should be held. func (mset *stream) noInterest(seq uint64, obs *consumer) bool { return !mset.checkForInterest(seq, obs) } ``` This wasn't done in `cleanupNoInterestMessages`. Signed-off-by: Maurice van Veen <[email protected]>
The `hbit` had two purposes depending on whether it was applied to the `mb.cache.idx` or the `rl` but it could be confusing. Signed-off-by: Neil Twigg <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
The `hbit` had two purposes depending on whether it was applied to the `mb.cache.idx` or the `rl` but it could be confusing. This PR adds a new `cbit` for clarity, although it has the same computed value. Signed-off-by: Neil Twigg <[email protected]>
…ons on hub If the hub has a user with subscribe permissions on a literal subject that the leaf is trying to create a queue subscription on, the interest may not be propagated. The issue was caused by the fact that we were checking the permissions on the key (that includes subject and queue name) instead of the subject itself. Resolves #6281 Signed-off-by: Ivan Kozlovic <[email protected]>
…ons on hub (#6291) If the hub has a user with subscribe permissions on a literal subject that the leaf is trying to create a queue subscription on, the interest may not be propagated. The issue was caused by the fact that we were checking the permissions on the key (that includes subject and queue name) instead of the subject itself. Resolves #6281 Signed-off-by: Ivan Kozlovic <[email protected]>
Bumps [github.com/google/go-tpm](https://github.com/google/go-tpm) from 0.9.0 to 0.9.3. - [Release notes](https://github.com/google/go-tpm/releases) - [Commits](google/go-tpm@v0.9.0...v0.9.3) --- updated-dependencies: - dependency-name: github.com/google/go-tpm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Switch to goreleaser v2, similar to: nats-io/natscli#1191 ## Test plan: ``` [alex@omenlaptop:nats-server] [13:15:58] goreleaser_v2_config [] NGS-Default-CLI # goreleaser check -f .goreleaser.yml • checking path=.goreleaser.yml • 1 configuration file(s) validated • thanks for using goreleaser! [alex@omenlaptop:nats-server] [13:16:02] goreleaser_v2_config [] NGS-Default-CLI # goreleaser check -f .goreleaser-nightly.yml • checking path=.goreleaser-nightly.yml • 1 configuration file(s) validated • thanks for using goreleaser! ``` ``` # goreleaser release --snapshot --clean -f .goreleaser.yml # goreleaser release --snapshot --clean -f .goreleaser-nightly.yml ``` Signed-off-by: Alex Bozhenko <[email protected]>
Bumps [github.com/google/go-tpm](https://github.com/google/go-tpm) from 0.9.0 to 0.9.3. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/google/go-tpm/releases">github.com/google/go-tpm's releases</a>.</em></p> <blockquote> <h2>v0.9.3</h2> <h2>What's Changed</h2> <ul> <li>Fix README.md missmatch module and directory name by <a href="https://github.com/JulesdeCube"><code>@JulesdeCube</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/374">google/go-tpm#374</a></li> <li>Improve TPMUSensitiveComposite and crypto by <a href="https://github.com/AlexandreEXFO"><code>@AlexandreEXFO</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/372">google/go-tpm#372</a></li> <li>Unify ECC public key helpers on ECDHPub and ECDSAPub by <a href="https://github.com/chrisfenner"><code>@chrisfenner</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/380">google/go-tpm#380</a></li> <li>Improve crypto & constants by <a href="https://github.com/AlexandreEXFO"><code>@AlexandreEXFO</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/381">google/go-tpm#381</a></li> <li>Test Pub() and Priv() by exporting the key and signing/verifying from software by <a href="https://github.com/chrisfenner"><code>@chrisfenner</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/382">google/go-tpm#382</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/JulesdeCube"><code>@JulesdeCube</code></a> made their first contribution in <a href="https://redirect.github.com/google/go-tpm/pull/374">google/go-tpm#374</a></li> <li><a href="https://github.com/AlexandreEXFO"><code>@AlexandreEXFO</code></a> made their first contribution in <a href="https://redirect.github.com/google/go-tpm/pull/372">google/go-tpm#372</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/google/go-tpm/compare/v0.9.2...v0.9.3">https://github.com/google/go-tpm/compare/v0.9.2...v0.9.3</a></p> <h2>v0.9.2</h2> <h2>What's Changed</h2> <ul> <li>add PolicyAuthValue by <a href="https://github.com/salrashid123"><code>@salrashid123</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/359">google/go-tpm#359</a></li> <li>add EncryptDecrypt2 support by <a href="https://github.com/salrashid123"><code>@salrashid123</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/360">google/go-tpm#360</a></li> <li>add TPM2_PolicyDuplicationSelect by <a href="https://github.com/salrashid123"><code>@salrashid123</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/365">google/go-tpm#365</a></li> <li>Add TPMFW (firmware) handles and FirmwareLimited attribute to TPMAObject by <a href="https://github.com/destinideinde"><code>@destinideinde</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/366">google/go-tpm#366</a></li> <li>Trivial fixes for lint and nullability by <a href="https://github.com/chrisfenner"><code>@chrisfenner</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/368">google/go-tpm#368</a></li> <li>Create individual packages for Windows and Linux TPM transport by <a href="https://github.com/chrisfenner"><code>@chrisfenner</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/369">google/go-tpm#369</a></li> <li>Fix KnownName() and Empty Buffer sequence handle Names by <a href="https://github.com/nckrss"><code>@nckrss</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/371">google/go-tpm#371</a></li> </ul> <h2>New Contributors</h2> <ul> <li><a href="https://github.com/salrashid123"><code>@salrashid123</code></a> made their first contribution in <a href="https://redirect.github.com/google/go-tpm/pull/359">google/go-tpm#359</a></li> <li><a href="https://github.com/destinideinde"><code>@destinideinde</code></a> made their first contribution in <a href="https://redirect.github.com/google/go-tpm/pull/366">google/go-tpm#366</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/google/go-tpm/compare/v0.9.1...v0.9.2">https://github.com/google/go-tpm/compare/v0.9.1...v0.9.2</a></p> <h2>v0.9.1</h2> <p>This release adds a few new commands to the "direct" (non-legacy) interface, including:</p> <ul> <li>EvictControl</li> <li>HMAC_Start</li> <li>ObjectChangeAuth</li> <li>Duplicate</li> <li>TestParms</li> <li>HierarchyChangeAuth</li> </ul> <p>Many thanks to our contributors!</p> <h2>What's Changed</h2> <ul> <li>Remove temporary <code>.swp</code> file by <a href="https://github.com/hslatman"><code>@hslatman</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/333">google/go-tpm#333</a></li> <li>chore: remove refs to deprecated io/ioutil by <a href="https://github.com/testwill"><code>@testwill</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/334">google/go-tpm#334</a></li> <li>feat: tpm2.EvictControl by <a href="https://github.com/jclab-joseph"><code>@jclab-joseph</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/338">google/go-tpm#338</a></li> <li>tpm2: Implement TPM2_Import by <a href="https://github.com/Foxboron"><code>@Foxboron</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/341">google/go-tpm#341</a></li> <li>Allow callers to omit handles from commands when RH_NULL by <a href="https://github.com/chrisfenner"><code>@chrisfenner</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/344">google/go-tpm#344</a></li> <li>Introduce helper for formatting PCR selection bitmasks by <a href="https://github.com/chrisfenner"><code>@chrisfenner</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/345">google/go-tpm#345</a></li> <li>Fix the mistake of signature algorithm number by <a href="https://github.com/akakou"><code>@akakou</code></a> in <a href="https://redirect.github.com/google/go-tpm/pull/349">google/go-tpm#349</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/google/go-tpm/commit/a21381d5aaa61c04bcb8d2a853f20e6960cd9d3c"><code>a21381d</code></a> Test Pub() and Priv() by exporting the key and signing/verifying from softwar...</li> <li><a href="https://github.com/google/go-tpm/commit/644dc323eb21b8826f71b93fb6b146e5ab73cebf"><code>644dc32</code></a> Improve crypto & constants (<a href="https://redirect.github.com/google/go-tpm/issues/381">#381</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/62081889b80f2b5cb166a6ec191aad4042b1e8fa"><code>6208188</code></a> Unify ECC public key helpers on ECDHPub and ECDSAPub (<a href="https://redirect.github.com/google/go-tpm/issues/380">#380</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/49968d84bf34ce68018191f27cfc617c2d0c9740"><code>49968d8</code></a> Improve TPMUSensitiveComposite and crypto (<a href="https://redirect.github.com/google/go-tpm/issues/372">#372</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/7d8a26b58cafabc940c3e244bf7c2b22e417ca70"><code>7d8a26b</code></a> FIX: README: missmatch module and directory name (<a href="https://redirect.github.com/google/go-tpm/issues/374">#374</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/364d5f2f78b95ba23e321373466a4d881181b85d"><code>364d5f2</code></a> Fix KnownName() and Empty Buffer sequence handle Names (<a href="https://redirect.github.com/google/go-tpm/issues/371">#371</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/d96ccf71568571dba925660724354682fe8e5fa2"><code>d96ccf7</code></a> Create individual packages for Windows and Linux TPM transport (<a href="https://redirect.github.com/google/go-tpm/issues/369">#369</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/ec702090749bc96310fcf40e7c567db1c5feea5b"><code>ec70209</code></a> Trivial fixes for lint and nullability (<a href="https://redirect.github.com/google/go-tpm/issues/368">#368</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/042b4e4b69dc6313558e7005be992ebbc96764b6"><code>042b4e4</code></a> Add TPMFW (firmware) handles and FirmwareLimited attribute to TPMAObject (<a href="https://redirect.github.com/google/go-tpm/issues/366">#366</a>)</li> <li><a href="https://github.com/google/go-tpm/commit/1642fe0ffa2a4e9940cadb54e02eb7fe75ce509d"><code>1642fe0</code></a> add TPM2_PolicyDuplicationSelect (<a href="https://redirect.github.com/google/go-tpm/issues/365">#365</a>)</li> <li>Additional commits viewable in <a href="https://github.com/google/go-tpm/compare/v0.9.0...v0.9.3">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/google/go-tpm&package-manager=go_modules&previous-version=0.9.0&new-version=0.9.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
For some reason doing a stream snapshot at an interval of 10s (as designed) degrades performance. Removing the interval and always snapshotting when hitting compaction minimum improves performance. Signed-off-by: Maurice van Veen <[email protected]>
The drifting tests would occasionally fail due to the consumer pending count drifting. This was due to a race condition described on `checkNumPending`: ``` // Does some sanity checks to see if we should re-calculate. // Since there is a race when decrementing when there is contention at the beginning of the stream. // The race is a getNextMsg skips a deleted msg, and then the decStreamPending call fires. // This does some quick sanity checks to see if we should re-calculate num pending. // Lock should be held. func (o *consumer) checkNumPending() uint64 { ``` This PR doesn't fix this race condition, but improves the tracking which improves test reliability. If the race condition happens we can still check if the deleted message is between `o.asflr` and the `o.sseq` that's skipped ahead. In which case we can still decrement the pending count (`o.npc`) if the message is not pending/delivered. This improves the reliability of the pending count tracking as long as the ack floor hasn't moved up yet. Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Alex Bozhenko <[email protected]>
Use commit time in mod_timestamp, as documented in: https://goreleaser.com/customization/builds/#reproducible-builds https://goreleaser.com/blog/reproducible-builds/ https://goreleaser.com/customization/templates/?h=templates#common-fields ## Test plan: ### Before. Build two times: ``` goreleaser release --snapshot --clean -f .goreleaser.yml mv dist/ ~/tmp/dist_before goreleaser release --snapshot --clean -f .goreleaser.yml vimdiff dist/SHA256SUMS ~/tmp/dist_before/SHA256SUMS ``` Observe all the shasums are different: ![image](https://github.com/user-attachments/assets/ed0b932c-ab5b-46de-bf73-0516e223af8a) ### After: Do the build two times, ``` goreleaser release --snapshot --clean -f .goreleaser.yml mv dist/ ~/tmp/dist_after goreleaser release --snapshot --clean -f .goreleaser.yml vimdiff dist/SHA256SUMS ~/tmp/dist_after/SHA256SUMS ``` Observe that only rpm and deb packages are different ![image](https://github.com/user-attachments/assets/ad4e3786-5d2b-480b-9e66-c2824f379d57) There was a feature added to goreleaser to make packages reproducible too, but I haven't figured out how to use it yet: goreleaser/nfpm#748 I asked in Discord. We can tackle that separately Signed-off-by: Alex Bozhenko <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Neil Twigg <[email protected]>
… that when checking for next expiry Signed-off-by: Neil Twigg <[email protected]>
Makes the change suggested in #6297 (comment) Signed-off-by: Maurice van Veen <[email protected]>
This is an incomplete but somewhat-working implementations of per-message TTLs. Notes: - Adds `AllowMsgTTL` to stream config; - Parses the `Nats-TTL` message header as a parsable duration, or if not, second precision; - Bumps the `index.db` magic version so that we can add a new field for tracking how many TTL'd messages are in each message block (means that `index.db` needs to be rebuilt if downgrading); - Adds a new `thw.db` to store the timed hash wheel state, and tries to rebuild it from a linear scan if it is missing or out-of-date. Future work: - Memory store support; - Expires "never" including not aging out with MaxAge; - Ability to update a TTL for a message; - Decide what we want to do for enabling/disabling TTL support; - Decide how mirroring/sourcing streams will handle TTL headers. Signed-off-by: Neil Twigg <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
`nextTTL` was not defaulted to `math.MaxInt64` so it would not cancel the age check in this condition: `if fs.state.Msgs == 0 && nextTTL == math.MaxInt64`. Signed-off-by: Maurice van Veen <[email protected]>
This will generate a new set of SPDX-formatted SBOM files on a release using the the GoReleaser + Syft toolchain. Travis currently invocates GoReleaser so the Syft dependency needs to be installed ahead of the `deploy` action. Signed-off-by: Byron Ruth <[email protected]>
Signed-off-by: Byron Ruth <[email protected]>
Signed-off-by: Byron Ruth <[email protected]>
This is a followup to #6306 which pins the Syft version.
Signed-off-by: Maurice van Veen <[email protected]>
Signed-off-by: Maurice van Veen <[email protected]>
There was a race with keeping peers up-to-date. When updating replicas of a stream up and down rapidly enough the peer state could desync since the update is handled by the meta layer, but the peer removal is handled by the stream. If the meta layer agreed on scaling the stream up to 5 replicas, but a peer removal came in after from an earlier downscale, then a server would end up with an incomplete peer list. Since peer changes are done by the meta layer we can/should trust that does the right thing, and we don't need to fiddle by proposing peer removals ourselves. Also, since the meta layer handles stream creates/updates and calls into `UpdateKnownPeers` already, we shouldn't then propose the peers (again) through the stream layer. Signed-off-by: Maurice van Veen <[email protected]>
) There could be a call to `n.PauseApply()`, for example during recovery if a max size is reached or when doing a stream catchup. This pauses the commits but was not reflected by the health check. Should only report current/healthy if we're paused but still up-to-date, with pending commits we should wait for `n.ResumeApply()` to be called and applies to be current. Signed-off-by: Maurice van Veen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #NNN
git pull --rebase origin main
)Resolves #
Changes proposed in this pull request: