Skip to content
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

PR to merge dev branch into main #612

Merged
merged 16 commits into from
Nov 7, 2022
Merged

PR to merge dev branch into main #612

merged 16 commits into from
Nov 7, 2022

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented Nov 7, 2022

Made sure that dev was updated with main, then created a branch out of main in which I merged dev and pushed that branch, then created this PR out of it. Here is the complete list of steps:

git checkout main
git pull
git checkout dev
git pull
git merge main
git checkout main
git checkout -b merge_dev_to_main
git merge --no-ff dev
git push --set-upstream origin merge_dev_to_main

Then opened the PR from the branch merge_dev_to_main and selected main for the base branch (which is the default).

Signed-off-by: Ivan Kozlovic [email protected]

Signed-off-by: Ivan Kozlovic <[email protected]>
[ADDED] KeyValue: kvStatus_Bytes() to return size of the bucket
Signed-off-by: Ivan Kozlovic <[email protected]>
Until now, the js_CreateKeyValue() call would possibly attempt
to update the underlying stream to set some properties that
were added from release to release. This had an unexpected side
effect when a stream in a newer server has new properties that
the application linked to an older library was not aware of and
would not unmarshal. Even if a stream comparison (minus the
property we would want to update) would return OK, it could be
wrong because we would disregard new properties not known by
the old client library.

Signed-off-by: Ivan Kozlovic <[email protected]>
[CHANGED] KeyValue: library will no longer try to update the stream
Also updated state for proper Put() and Get() semantics with mirrors
and across domains, e.g. leafnodes.

In practice when a mirror is across a domain, should be named the
same as origin. That allows an app to run anywhere without anything
special in terms of domains when binding to the KV itself.

(Removed dead-code following previous PR #607)

Signed-off-by: Ivan Kozlovic <[email protected]>
Needed to have delete use the put prefix and bind to the stream
when creating the watcher's subscription because in case of mirror
the subject would not allow to find the stream.

Signed-off-by: Ivan Kozlovic <[email protected]>
[ADDED] KeyValue: Support for Mirror and Sources
`jsStreamInfo` will now possibly have a list of stream alternates
represented by a mirror:
```
typedef struct jsStreamInfo
{
        (...)
        jsStreamAlternate       **Alternates;
        int                     AlternatesLen;

} jsStreamInfo;

The definition of a stream alternate is:
```
typedef struct jsStreamAlternate
{
        const char              *Name;
        const char              *Domain;
        const char              *Cluster;

} jsStreamAlternate;
```

Also added some of the new JS specific error codes.

Signed-off-by: Ivan Kozlovic <[email protected]>
[ADDED] Stream alternates in `jsStreamInfo`
@kozlovic kozlovic requested a review from aricart November 7, 2022 20:04
Copy link
Member

@aricart aricart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit 92316be into main Nov 7, 2022
@kozlovic kozlovic deleted the merge_dev_to_main branch November 7, 2022 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants