Skip to content

Commit

Permalink
Merge branch 'gitbook-dev' of github.com:dolthub/docs into gitbook-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
timsehn committed Feb 27, 2024
2 parents 5d06601 + d127632 commit 5c7c925
Show file tree
Hide file tree
Showing 25 changed files with 262 additions and 89 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/.gitbook/assets/prolly-tree-delete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
234 changes: 217 additions & 17 deletions content/architecture/storage-engine/prolly-tree.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions content/products/doltlab/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "Installation"
---

The latest version of DoltLab is `v2.0.7` and to get started running your own DoltLab instance, you can follow the steps below. To see release notes for [DoltLab's releases](https://github.com/dolthub/doltlab-issues/releases) or to report and track DoltLab issues, visit DoltLab's [issues repository](https://github.com/dolthub/doltlab-issues).
The latest version of DoltLab is `v2.0.8` and to get started running your own DoltLab instance, you can follow the steps below. To see release notes for [DoltLab's releases](https://github.com/dolthub/doltlab-issues/releases) or to report and track DoltLab issues, visit DoltLab's [issues repository](https://github.com/dolthub/doltlab-issues).

Please note, that to upgrading to a newer version of DoltLab will require you to kill the older version of DoltLab and install the newer one, which may result in data loss.

Expand Down Expand Up @@ -39,15 +39,15 @@ If your host is running Ubuntu 18.04/20.04, the quickest way to install these de
To use them:

```bash
export DOLTLAB_VERSION=v2.0.7
export DOLTLAB_VERSION=v2.0.8
chmod +x ubuntu-bootstrap.sh
sudo ./ubuntu-bootstrap.sh with-sudo "$DOLTLAB_VERSION"
cd doltlab
sudo newgrp docker # login as root to run docker without sudo
```

```bash
export DOLTLAB_VERSION=v2.0.7
export DOLTLAB_VERSION=v2.0.8
chmod +x centos-bootstrap.sh
sudo ./centos-bootstrap.sh with-sudo "$DOLTLAB_VERSION"
cd doltlab
Expand Down Expand Up @@ -81,7 +81,7 @@ cd doltlab

To install a specific version, run:
```bash
export DOLTLAB_VERSION=v2.0.7
export DOLTLAB_VERSION=v2.0.8
curl -LO https://doltlab-releases.s3.amazonaws.com/linux/amd64/doltlab-${DOLTLAB_VERSION}.zip
unzip doltlab-${DOLTLAB_VERSION}.zip -d doltlab
cd doltlab
Expand Down
8 changes: 4 additions & 4 deletions content/reference/sql/benchmarks/correctness.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ AND col3 IN (3,9,0))))) OR col4 <= 4.25 OR ((col3 = 5))) OR (((col0 >
0)) AND col0 > 6 AND (col4 >= 6.56)))
```

Here are Dolt's sqllogictest results for version `1.34.0`. Tests that
Here are Dolt's sqllogictest results for version `1.34.2`. Tests that
did not run could not complete due to a timeout earlier in the run.
<!-- START___DOLT___CORRECTNESS_RESULTS_TABLE -->
| Results | Count |
|---------|---------|
| not ok | 26 |
| ok | 5937431 |
| not ok | 9 |
| ok | 5937448 |

| Total Tests | 5937457 |
|-------------|---------|

| Correctness Percentage | 99.999562 |
| Correctness Percentage | 99.999848 |
|------------------------|-----------|
<!-- END___DOLT___CORRECTNESS_RESULTS_TABLE -->
<br/>
57 changes: 31 additions & 26 deletions content/reference/sql/benchmarks/latency.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,41 @@ attempt to run as many queries as possible in a fixed 2 minute time
window. The `Dolt` and `MySQL` columns show the median latency in
milliseconds (ms) of each query during that 2 minute time window.

The Dolt version is `1.34.0`.
The Dolt version is `1.34.2`.

<!-- START___DOLT___LATENCY_RESULTS_TABLE -->
| Read Tests | MySQL | Dolt | Multiple |
|-------------------------|-------|--------|----------|
| covering\_index\_scan | 2.11 | 3.02 | 1.4 |
| groupby\_scan | 13.7 | 18.28 | 1.3 |
| index\_join | 1.34 | 5.28 | 3.9 |
| index\_join\_scan | 1.25 | 2.22 | 1.8 |
| index\_scan | 33.72 | 62.19 | 1.8 |
| oltp\_point\_select | 0.17 | 0.47 | 2.8 |
| oltp\_read\_only | 3.36 | 8.13 | 2.4 |
| select\_random\_points | 0.32 | 0.77 | 2.4 |
| select\_random\_ranges | 0.39 | 0.9 | 2.3 |
| table\_scan | 34.33 | 62.19 | 1.8 |
| types\_table\_scan | 74.46 | 170.48 | 2.3 |
| reads\_mean\_multiplier | | | 2.2 |
| Read Tests | MySQL | Dolt | Multiple |
|-------------------------|-------|-------|----------|
| covering\_index\_scan | 2.11 | 2.81 | 1.3 |
| groupby\_scan | 13.7 | 17.01 | 1.2 |
| index\_join | 1.32 | 4.91 | 3.7 |
| index\_join\_scan | 1.25 | 2.14 | 1.7 |
| index\_scan | 33.72 | 57.87 | 1.7 |
| oltp\_point\_select | 0.17 | 0.46 | 2.7 |
| oltp\_read\_only | 3.36 | 8.13 | 2.4 |
| select\_random\_points | 0.33 | 0.77 | 2.3 |
| select\_random\_ranges | 0.38 | 0.87 | 2.3 |
| table\_scan | 34.33 | 57.87 | 1.7 |
| types\_table\_scan | 74.46 | 155.8 | 2.1 |
| reads\_mean\_multiplier | | | 2.1 |

| Write Tests | MySQL | Dolt | Multiple |
|--------------------------|-------|-------|----------|
| oltp\_delete\_insert | 5.88 | 5.99 | 1.0 |
| oltp\_insert | 2.81 | 2.97 | 1.1 |
| oltp\_read\_write | 7.43 | 15.55 | 2.1 |
| oltp\_update\_index | 2.86 | 3.13 | 1.1 |
| oltp\_update\_non\_index | 2.97 | 3.07 | 1.0 |
| oltp\_write\_only | 4.03 | 7.43 | 1.8 |
| types\_delete\_insert | 5.47 | 6.67 | 1.2 |
| writes\_mean\_multiplier | | | 1.3 |

| Overall Mean Multiple | 1.9 |
|-----------------------|-----|
| oltp\_delete\_insert | 5.67 | 5.99 | 1.1 |
| oltp\_insert | 2.76 | 3.02 | 1.1 |
| oltp\_read\_write | 7.3 | 15.27 | 2.1 |
| oltp\_update\_index | 2.81 | 3.07 | 1.1 |
| oltp\_update\_non\_index | 2.86 | 3.02 | 1.1 |
| oltp\_write\_only | 3.96 | 7.43 | 1.9 |
| types\_delete\_insert | 5.57 | 6.67 | 1.2 |
| writes\_mean\_multiplier | | | 1.4 |

| TPC-C TPS Tests | MySQL | Dolt | Multiple |
|-----------------------|--------|------|----------|
| tpcc-scale-factor-1 | 110.64 | 15.5 | 6.5 |
| tpcc\_tps\_multiplier | | | 6.5 |

| Overall Mean Multiple | 3.33 |
|-----------------------|------|
<!-- END___DOLT___LATENCY_RESULTS_TABLE -->
<br/>
33 changes: 0 additions & 33 deletions content/reference/sql/server/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,36 +90,3 @@ depending on the size of the database, the size of the updates, replication sett
factors.

Improving maximum write concurrency is an ongoing project.

## Session state leaking due to connection pooling

Many SQL database client libraries implement some kind of connection pool, where connections to the
database are created ahead of time and then handed out to different execution threads when needed to
execute queries. This is typically done to reduce latency on database operations. Usually these pools
reuse connections after they are returned to the pool.

Using connection pooling with Dolt when combined with `dolt_checkout()` can be problematic, because
a session that gets returned to the pool and re-used may behave differently (modify a different
branch head) than a fresh connection. Consider this sequence:

```sql
call dolt_checkout('feature-branch');
...
call dolt_commit();
```

When this connection is returned to the pool, its session has `feature-branch` checked out. If it's
reused by another execution thread that expects a different branch, you have a bug.

To mitigate potential bugs with the checked out branch in session state, we recommend that you
either:

* Disable connection pooling if feasible
* Configure your connection pool to not re-use connections that were returned to it
* Use a different connection string for each branch (this may mean using multiple connection pools)
* Augment your application logic to always begin a new unit of work with `call dolt_checkout(...)`
to ensure the expected branch is checked out for the session

[Implementing the `COM_RESET_CONNECTION` protocol](https://github.com/dolthub/dolt/issues/3921)
would solve the problem of leaking session state between different execution threads, but support
for this functionality in popular libraries is spotty. For now, use the above guidance.
2 changes: 1 addition & 1 deletion content/reference/sql/sql-support/supported-statements.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ title: Supported Statements
| `UPDATE` || No support for referring to more than one table in a single `UPDATE` statement. |
| `VALUES` || |
| `WITH` || |
| `SELECT INTO` || Selecting into a file is not supported. |
| `SELECT INTO` || Charset/Collation specification not supported. |

## Data definition statements

Expand Down
2 changes: 2 additions & 0 deletions content/reference/sql/version-control/dolt-sql-procedures.md
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,8 @@ CALL DOLT_CLONE('dolthub/us-jails', 'myCustomDbName');

`-b`, `--branch`: The branch to be cloned. If not specified all branches will be cloned.

`--depth`: Clone a single branch and limit history to the given commit depth.

### Output Schema

```text
Expand Down
7 changes: 3 additions & 4 deletions update-perf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@ os_type="darwin"

sql_reference_dir="content/reference/sql/benchmarks"

new_table="updated.md"

start_template='<!-- START_%s_%s_RESULTS_TABLE -->'
end_template='<!-- END_%s_%s_RESULTS_TABLE -->'

if [ "$#" -ne 3 ]; then
echo "Must supply version and type, eg update-perf.sh 'v0.39.0' '__LD_1__|__DOLT__' 'latency|correctness'"
if [ "$#" -ne 4 ]; then
echo "usage: update-perf.sh <version> <format> <type: latency/correctness> <filepath>"
exit 1;
fi

version="$1"
storage_format="$2"
type="$3"
new_table="$4"

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
os_type="linux"
Expand Down

0 comments on commit 5c7c925

Please sign in to comment.