Skip to content

3.3.1 release notes for bug NCBC-3192 in 3.3.0 #257

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

Open
wants to merge 9 commits into
base: release/3.3
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM mcr.microsoft.com/dotnet/sdk:6.0

LABEL org.opencontainers.image.authors="Hakim Cassimally <[email protected]>"

RUN apt-get update -y \
&& \
apt-get install -y \
curl vim git

# edit these variables as required
ENV PRE_RELEASE_VERSION 3.2.8-pre
ENV PRE_RELEASE_BUILD r5705
ENV PRE_RELEASE_SOURCE http://sdk.jenkins.couchbase.com/job/dotnet/job/sdk/job/couchbase-net-client-scripted-build-pipeline/lastSuccessfulBuild/artifact/couchbase-net-client-${PRE_RELEASE_VERSION}-${PRE_RELEASE_BUILD}.zip

RUN mkdir -p /app/nuget-sources/
WORKDIR /app/nuget-sources/
RUN curl -O ${PRE_RELEASE_SOURCE}
RUN dotnet nuget add source /app/nuget-sources/

WORKDIR /app
RUN dotnet new console
RUN dotnet add package CouchbaseNetClient -v ${PRE_RELEASE_VERSION}

RUN dotnet tool install -g dotnet-script
RUN export PATH="$PATH:/root/.dotnet/tools"

# RUN git clone https://github.com/couchbase/docs-sdk-dotnet.git
# NB: instead we will mount working directory in docker-compose.yml

ENTRYPOINT ["/bin/bash", "-l", "-c"]
CMD ["/bin/bash"]
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3.9"

# USAGE: docker-compose run cb-dotnet-sdk bash

services:
cb-dotnet-sdk:
build: .
depends_on:
- db
container_name: cb-dotnet-sdk
entrypoint: [ "/bin/bash", "-l", "-c" ]
volumes:
- .:/app/docs-sdk-dotnet

db:
image: build-docker.couchbase.com:443/couchbase/server-internal:7.1.0-2549
ports:
- "8091-8095:8091-8095"
- "11210:11210"
expose: # expose ports 8091 & 8094 to other containers (mainly for backend)
- "8091"
- "8092"
- "8093"
- "8094"
- "8095"
- "11210"
container_name: couchbase-db
2 changes: 1 addition & 1 deletion modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

.Getting Started
* xref:hello-world:start-using-sdk.adoc[Start Using the .NET SDK]
// ** xref:hello-world:platform-help.adoc[Platform Introduction]
** xref:hello-world:platform-help.adoc[Platform Introduction]
* xref:hello-world:sample-application.adoc[Sample Application]

.Working with Data
Expand Down
2 changes: 1 addition & 1 deletion modules/concept-docs/pages/analytics-for-sdk-users.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ For complex and long-running queries, involving large ad hoc join, set, aggregat

== Additional Resources

* Start with our xref:{version-server}@server:analytics:primer-beer.adoc[introductory primer].
* Start with our xref:7.0@server:analytics:primer-beer.adoc[introductory primer].
* Read the practical introduction xref:howtos:analytics-using-sdk.adoc[using analytics from the SDK].
2 changes: 1 addition & 1 deletion modules/concept-docs/pages/collections.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ include::project-docs:partial$attributes.adoc[]

The Collections feature in Couchbase Server is fully implemented in the 3.2 API version of the Couchbase SDK.

Information on _Collections_ can be found in the xref:{version-server}@server:learn:data:scopes-and-collections.adoc[server docs].
Information on _Collections_ can be found in the xref:7.0@server:learn:data:scopes-and-collections.adoc[server docs].

== Using Collections & Scopes

Expand Down
2 changes: 1 addition & 1 deletion modules/concept-docs/pages/compression.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ However, stable Snappy support is not yet available in .NET.



Couchbase Server (in the Enterprise Edition) stores documents in compressed form, xref:{version-server}@server:learn:buckets-memory-and-storage/compression.adoc#compression-modes[when it is enabled in the server for a particular bucket], using Snappy Compression.
Couchbase Server (in the Enterprise Edition) stores documents in compressed form, xref:7.0@server:learn:buckets-memory-and-storage/compression.adoc#compression-modes[when it is enabled in the server for a particular bucket], using Snappy Compression.
As the Snappy compression library is not available for .NET, the server will automatically uncompress any compressed documents before sending them to the .NET client.

If compression is set to _active_ on the server, documents will be stored there in compressed form, even though the .NET client has sent them uncompressed, thus saving storage space (but not network bandwidth).
4 changes: 2 additions & 2 deletions modules/concept-docs/pages/documents.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ await collection.MutateInAsync("customer123", new List<MutateInSpec>
});
----

or xref:{version-server}@server:n1ql:n1ql-language-reference/update.adoc[N1QL UPDATE] to update documents based on specific query criteria:
or xref:7.0@server:n1ql:n1ql-language-reference/update.adoc[N1QL UPDATE] to update documents based on specific query criteria:

[source,sql]
----
Expand Down Expand Up @@ -126,5 +126,5 @@ include::{version-server}@sdk:shared:partial$documents.adoc[tag=expiration]
IMPORTANT: If you are using the overloads that take `IDocument`, note that the `IDocument.Expiry` property assumes ms (milli-seconds), and is converted to seconds before being sent to the server.
All other overloads take a `TimeSpan` or an `uint`, and assume an expiry in seconds
A time of zero will set the document to never expire
(a negative number will set expiry to immediate -- creating a xref:{version-server}@server:learn:buckets-memory-and-storage/storage.adoc#tombstones[tombstone]).
(a negative number will set expiry to immediate -- creating a xref:7.0@server:learn:buckets-memory-and-storage/storage.adoc#tombstones[tombstone]).
Values above 0ms but below 1000ms are rounded up to one second before being sent to the server -- _if you are using .NET SDK 3.0.4 or later_.
10 changes: 5 additions & 5 deletions modules/concept-docs/pages/n1ql-query.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ var result = await cluster.QueryAsync<dynamic>(
);
----

CAUTION: *When running an application using Prepared Statements through the .NET SDK* -- if you plan to upgrade Couchbase Server from 6.0.x or earlier to 6.5.0 or later, and are running a version of the .NET SDK prior to xref:project-docs:sdk-release-notes.adoc#version-3-0-1-13-may-2020[3.0.1], you will need to xref:{version-server}@server:install:upgrade-strategy-for-features.adoc#prepared-statements[restart the app or otherwise work around] a change in the Server's behaviour.
CAUTION: *When running an application using Prepared Statements through the .NET SDK* -- if you plan to upgrade Couchbase Server from 6.0.x or earlier to 6.5.0 or later, and are running a version of the .NET SDK prior to xref:project-docs:sdk-release-notes.adoc#version-3-0-1-13-may-2020[3.0.1], you will need to xref:7.0@server:install:upgrade-strategy-for-features.adoc#prepared-statements[restart the app or otherwise work around] a change in the Server's behaviour.


== Indexes

The Couchbase query service makes use of xref:{version-server}@server:learn:services-and-indexes/indexes/indexes.adoc[_indexes_] in order to do its work.
The Couchbase query service makes use of xref:7.0@server:learn:services-and-indexes/indexes/indexes.adoc[_indexes_] in order to do its work.
Indexes replicate subsets of documents from data nodes over to index nodes,
allowing specific data (for example, specific document properties) to be retrieved quickly,
and to distribute load away from data nodes in xref:{version-server}@server:learn:services-and-indexes/services/services.adoc[MDS] topologies.
and to distribute load away from data nodes in xref:7.0@server:learn:services-and-indexes/services/services.adoc[MDS] topologies.

[IMPORTANT]
In order to make a bucket queryable, it must have at least one index defined.
Expand Down Expand Up @@ -82,7 +82,7 @@ Indexes help improve the performance of a query.
When an index includes the actual values of all the fields specified in the query,
the index _covers_ the query, and eliminates the need to fetch the actual values from the Data Service.
An index, in this case, is called a _covering index_, and the query is called a _covered_ query.
For more information, see xref:{version-server}@server:n1ql:n1ql-language-reference/covering-indexes.adoc[Covering Indexes].
For more information, see xref:7.0@server:n1ql:n1ql-language-reference/covering-indexes.adoc[Covering Indexes].

You can also create and define indexes in the SDK using:

Expand Down Expand Up @@ -131,7 +131,7 @@ include::{version-server}@sdk:shared:partial$n1ql-queries.adoc[tag=index-consist

The following options are available:

include::{version-server}@server:learn:page$services-and-indexes/indexes/index-replication.adoc[tag=scan_consistency]
include::7.0@server:learn:page$services-and-indexes/indexes/index-replication.adoc[tag=scan_consistency]
////
* `not_bounded`: Executes the query immediately, without requiring any consistency for the query.
If index-maintenance is running behind, out-of-date results may be returned.
Expand Down
63 changes: 0 additions & 63 deletions modules/devguide/examples/dotnet/Cloud.cs

This file was deleted.

54 changes: 54 additions & 0 deletions modules/devguide/examples/dotnet/Cloud/Cloud.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
using System;
// #tag::using[]
using System.Threading.Tasks;
using Couchbase;
// #end::using[]

await new CloudExample().Main();

class CloudExample
{
public async Task Main()
{
// #tag::connect[]
var cluster = await Cluster.ConnectAsync(
// Update these credentials for your Capella instance!
"couchbases://cb.njg8j7mwqnvwjqah.cloud.couchbase.com",
new ClusterOptions
{
UserName = "username",
Password = "Password!123",
KvTimeout = TimeSpan.FromSeconds(10)
});
// #end::connect[]

// #tag::bucket[]
// get a bucket reference
var bucket = await cluster.BucketAsync("travel-sample");
// #end::bucket[]

// #tag::collection[]
// get a user-defined collection reference
var scope = await bucket.ScopeAsync("tenant_agent_00");
var collection = await scope.CollectionAsync("users");
// #end::collection[]

// #tag::upsert-get[]
// Upsert Document
var upsertResult = await collection.UpsertAsync("my-document-key", new { Name = "Ted", Age = 31 });
var getResult = await collection.GetAsync("my-document-key");

Console.WriteLine(getResult.ContentAs<dynamic>());
// #end::upsert-get[]

// tag::n1ql-query[]
// Call the QueryAsync() function on the cluster object and store the result.
var queryResult = await cluster.QueryAsync<dynamic>("select \"Hello World\" as greeting");

// Iterate over the rows to access result data and print to the terminal.
await foreach (var row in queryResult) {
Console.WriteLine(row);
}
// end::n1ql-query[]
}
}
16 changes: 16 additions & 0 deletions modules/devguide/examples/dotnet/Cloud/Cloud.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CouchbaseNetClient" Version="3.3.0" />
</ItemGroup>
<Target Name="RecordReferencePaths" AfterTargets="AfterResolveReferences">
<WriteLinesToFile File="$(OutputPath)/ReferencePaths.txt" Lines="@(ReferencePath)" />
</Target>

</Project>
7 changes: 5 additions & 2 deletions modules/hello-world/examples/StartUsing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ static async Task Main(string[] args)
{

// #tag::connect[]
var cluster = await Cluster.ConnectAsync("couchbase://localhost", "username", "password");
var cluster = await Cluster.ConnectAsync(
// Update these credentials for your Local Couchbase instance!
"couchbase://localhost",
"username",
"password");
// #end::connect[]


// #tag::bucket[]
// get a bucket reference
var bucket = await cluster.BucketAsync("travel-sample");
Expand Down
Loading