Skip to content

Commit

Permalink
[Breaking Change] Remove H2 as storage option permanently. (#12909)
Browse files Browse the repository at this point in the history
Remove H2 as storage option permanently. BanyanDB 0.8(OAP 10.2 required) is easy, stable and production-ready. Don't need H2 as default storage anymore.
  • Loading branch information
wu-sheng authored Dec 30, 2024
1 parent d3d3ee8 commit 5be35ba
Show file tree
Hide file tree
Showing 83 changed files with 810 additions and 1,491 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/skywalking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -362,8 +362,6 @@ jobs:
config: test/e2e-v2/cases/storage/banyandb/e2e.yaml
- name: BanyanDB TLS
config: test/e2e-v2/cases/storage/banyandb/tls/e2e.yaml
- name: Storage H2
config: test/e2e-v2/cases/storage/h2/e2e.yaml
- name: Storage MySQL
config: test/e2e-v2/cases/storage/mysql/e2e.yaml
- name: Storage PostgreSQL
Expand Down Expand Up @@ -395,8 +393,6 @@ jobs:
- name: Storage ES Sharding
config: test/e2e-v2/cases/storage/es/es-sharding/e2e.yaml

- name: Alarm H2
config: test/e2e-v2/cases/alarm/h2/e2e.yaml
- name: Alarm ES
config: test/e2e-v2/cases/alarm/es/e2e.yaml
- name: Alarm ES Sharding
Expand All @@ -417,15 +413,11 @@ jobs:

- name: Event BanyanDB
config: test/e2e-v2/cases/event/banyandb/e2e.yaml
- name: Event H2
config: test/e2e-v2/cases/event/h2/e2e.yaml
- name: Event ES
config: test/e2e-v2/cases/event/es/e2e.yaml
- name: Event MySQL
config: test/e2e-v2/cases/event/mysql/e2e.yaml

- name: Log H2
config: test/e2e-v2/cases/log/h2/e2e.yaml
- name: Log MySQL
config: test/e2e-v2/cases/log/mysql/e2e.yaml
- name: Log PostgreSQL
Expand Down Expand Up @@ -454,8 +446,6 @@ jobs:

- name: Trace Profiling BanyanDB
config: test/e2e-v2/cases/profiling/trace/banyandb/e2e.yaml
- name: Trace Profiling H2
config: test/e2e-v2/cases/profiling/trace/h2/e2e.yaml
- name: Trace Profiling ES
config: test/e2e-v2/cases/profiling/trace/es/e2e.yaml
- name: Trace Profiling ES Sharding
Expand Down Expand Up @@ -621,8 +611,6 @@ jobs:
config: test/e2e-v2/cases/zipkin/mysql/e2e.yaml
- name: Zipkin Opensearch
config: test/e2e-v2/cases/zipkin/opensearch/e2e.yaml
- name: Zipkin H2
config: test/e2e-v2/cases/zipkin/h2/e2e.yaml
- name: Zipkin Postgres
config: test/e2e-v2/cases/zipkin/postgres/e2e.yaml
- name: Zipkin Kafka
Expand Down Expand Up @@ -677,8 +665,6 @@ jobs:

- name: UI Menu BanyanDB
config: test/e2e-v2/cases/menu/banyandb/e2e.yaml
- name: UI Menu H2
config: test/e2e-v2/cases/menu/h2/e2e.yaml
- name: UI Menu ES
config: test/e2e-v2/cases/menu/es/e2e.yaml
- name: UI Menu Sharding ES
Expand Down Expand Up @@ -709,8 +695,6 @@ jobs:
config: test/e2e-v2/cases/profiling/async-profiler/banyandb/e2e.yaml
- name: Async Profiler MySQL
config: test/e2e-v2/cases/profiling/async-profiler/mysql/e2e.yaml
- name: Async Profiler h2
config: test/e2e-v2/cases/profiling/async-profiler/h2/e2e.yaml
steps:
- uses: actions/checkout@v3
with:
Expand Down
3 changes: 0 additions & 3 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ dependency:
- name: com.github.luben:zstd-jni
version: 1.4.3-1
license: BSD-2-Clause
- name: com.h2database:h2
version: 2.1.212
license: MPL-2.0
- name: org.antlr:antlr4-runtime
version: 4.11.1
license: BSD-3-Clause
Expand Down
8 changes: 0 additions & 8 deletions dist-material/release-docs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -575,14 +575,6 @@ The text of each license is also included in licenses/LICENSE-[project].txt.

https://mvnrepository.com/artifact/org.javassist/javassist/3.25.0-GA MPL-1.1 and LGPL-2.1

========================================================================
MPL-2.0 licenses
========================================================================
The following components are provided under the MPL-2.0 License. See project link for details.
The text of each license is also included in licenses/LICENSE-[project].txt.

https://mvnrepository.com/artifact/com.h2database/h2/2.1.212 MPL-2.0

========================================================================
Public Domain licenses
========================================================================
Expand Down
3 changes: 3 additions & 0 deletions docs/en/changes/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
publish the source tar and binary tar to the website download page, and docker images to docker hub.
* **Warning** If you are using the `skywalking-oap-server` as a dependency in your project, you need to download the
source tar from the website and publish them to your private maven repository.
* [Breaking Change] Remove H2 as storage option permanently. BanyanDB 0.8(OAP 10.2 required) is easy, stable and
production-ready. Don't need H2 as default storage anymore.

#### OAP Server

Expand Down Expand Up @@ -46,6 +48,7 @@
* Add component ID(160) for Caffeine.
* Alarm: Support store and query the metrics snapshot when the alarm is triggered.
* Alarm: Remove unused `Alarm Trend` query.
* Fix missing remote endpoint IP address in span query of zipkin query module.

#### UI

Expand Down
2 changes: 1 addition & 1 deletion docs/en/debugging/config_dump.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ in the dump result. For example, the `storage.elasticsearch.password` in the fol

```yaml
storage:
selector: ${SW_STORAGE:h2}
selector: ${SW_STORAGE:elasticsearch}
elasticsearch:
password: ${SW_ES_PASSWORD:""}
```
Expand Down
39 changes: 24 additions & 15 deletions docs/en/setup/backend/backend-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,29 @@ SkyWalking's backend distribution package consists of the following parts:

## Requirements and default settings

Requirement: **Java 11/17/21**.
Requirement: **Java 11/17/21**.

Before you begin, you should understand that the main purpose of the following quickstart is to help you obtain a basic configuration for previews/demos. Performance and long-term running are **NOT** among the purposes of the quickstart.
You should set up the database ready before starting the backend. We recommend to use BanyanDB.
If you want to use other databases, please read the [storage document](backend-storage.md).

**For production/QA/tests environments, see [Backend and UI deployment documents](ui-setup.md).**
Use the docker mode to run BanyanDB containerized.
```shell
docker pull apache/skywalking-banyandb:latest

You can use `bin/startup.sh` (or cmd) to start up the backend and UI with their default settings, set out as follows:
docker run -d \
-p 17912:17912 \
-p 17913:17913 \
--name banyandb \
apache/skywalking-banyandb:latest \
standalone
```

You can use `bin/startup.sh` (or cmd) to start up the OAP server and UI with their default settings,
OAP listens on `0.0.0.0/11800` for gRPC APIs and `0.0.0.0/12800` for HTTP APIs.

- Backend storage uses **H2 by default** (for an easier start)
- Backend listens on `0.0.0.0/11800` for gRPC APIs and `0.0.0.0/12800` for HTTP REST APIs.
In Java, DotNetCore, Node.js, and Istio agents/probes, you should set the gRPC service address to `ip/host:11800`, and IP/host should be where your OAP is.

In Java, DotNetCore, Node.js, and Istio agents/probes, you should set the gRPC service address to `ip/host:11800`, and IP/host should be where your backend is.
- UI listens on `8080` port and request `127.0.0.1/12800` to run a GraphQL query.
UI listens on `8080` port and request `127.0.0.1/12800` to run a GraphQL query.

### Interaction

Expand Down Expand Up @@ -114,12 +124,7 @@ Example:

```yaml
storage:
selector: mysql # the mysql storage will actually be activated, while the h2 storage takes no effect
h2:
properties:
jdbcUrl: ${SW_STORAGE_H2_URL:jdbc:h2:mem:skywalking-oap-db;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=FALSE}
dataSource.user: ${SW_STORAGE_H2_USER:sa}
metadataQueryMaxSize: ${SW_STORAGE_H2_QUERY_MAX_SIZE:5000}
selector: banyandb # the banyandb storage will actually be activated.
mysql:
properties:
jdbcUrl: ${SW_JDBC_URL:"jdbc:mysql://localhost:3306/swtest?allowMultiQueries=true"}
Expand All @@ -130,7 +135,11 @@ storage:
dataSource.prepStmtCacheSqlLimit: ${SW_DATA_SOURCE_PREP_STMT_CACHE_SQL_LIMIT:2048}
dataSource.useServerPrepStmts: ${SW_DATA_SOURCE_USE_SERVER_PREP_STMTS:true}
metadataQueryMaxSize: ${SW_STORAGE_MYSQL_QUERY_MAX_SIZE:5000}
# other configurations
banyandb:
targets: ${SW_STORAGE_BANYANDB_TARGETS:127.0.0.1:17912}
maxBulkSize: ${SW_STORAGE_BANYANDB_MAX_BULK_SIZE:10000}
flushInterval: ${SW_STORAGE_BANYANDB_FLUSH_INTERVAL:15}
flushTimeout: ${SW_STORAGE_BANYANDB_FLUSH_TIMEOUT:10}
```
1. **`storage`** is the module.
Expand Down
11 changes: 3 additions & 8 deletions docs/en/setup/backend/backend-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,19 @@ use one of them by specifying it as the `selector` in `application.yml`:

```yaml
storage:
selector: ${SW_STORAGE:elasticsearch}
selector: ${SW_STORAGE:banyandb}
```
Natively supported storage:
## BanyanDB - Native APM Database
- [BanyanDB](storages/banyandb.md)
This is recommended to use for medium scale deployments from 0.6 until 1.0.
It has demonstrated significant potential in performance improvement. As of version 0.6.1, it achieves 5x less memory usage,
It has demonstrated significant potential in performance improvement. It indicates 5x less memory usage,
1/5 disk IOPS, 1/4 disk throughput, and 30% less disk space, albeit with a slightly higher CPU trade-off, compared to Elasticsearch.
We are looking for early adoption. Please contact us through Slack channels if you are interested in using BanyanDB.
It is designed and implemented natively for SkyWalking use cases.
## SQL database
- [H2](storages/h2.md)
H2 is the default storage option in the distribution package. It is recommended to use H2 for testing and development ONLY.
- [MySQL and its compatible databases](storages/mysql.md)
- [PostgreSQL and its compatible databases](storages/postgresql.md)
Expand Down
Loading

0 comments on commit 5be35ba

Please sign in to comment.