mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-08-18 12:08:22 +00:00
c55f297dec
* chore: gate soft-drop table behind the enterprise feature Soft-drop table becomes an enterprise-only feature: - metasrv rejects gc.experimental_soft_drop.enable=true at startup in non-enterprise builds, and ddl_soft_drop_enabled is hard-disabled without the enterprise feature as a second line of defense - the UNDROP TABLE parser/AST/statement variant, ADMIN purge_table() registration, and information_schema.recycle_bin registration are compiled out unless the enterprise feature is enabled - common-meta procedures, tombstone keys, and DdlTask serde stay unconditional for persisted-procedure recovery and wire compatibility - the [gc.experimental_soft_drop] section is removed from the OSS example config and generated docs (moving to the enterprise repo) - the soft-drop sqlness cases and their CI job are removed from OSS (moving to the enterprise repo); affected information_schema .result files are regenerated Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * refactor: limit unused_variables allow to non-enterprise builds Addresses review comment: apply the allow via cfg_attr so enterprise builds still catch accidental unused variables in register_admin_only. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * refactor: include the config key in the soft-drop enterprise gate error Addresses review comment: name gc.experimental_soft_drop.enable in the startup validation error so users can locate the setting quickly when it is set via env vars or layered config. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * test: limit unused_mut allow to non-enterprise builds Addresses review comment: apply the allow via cfg_attr so enterprise builds still catch unused mut in the table_ddl_event test setup. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * feat: reject soft-drop DDL submissions in non-enterprise builds Addresses review comment: clients could bypass the SQL-level gates by submitting DdlTask::UndropTable or DdlTask::PurgeDroppedTable directly to the procedure service. Reject fresh submissions at the DdlManager boundary in non-enterprise builds while keeping the procedure loaders registered for crash recovery and wire compatibility. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * test: stop --enable-gc from enabling soft drop in the sqlness template Addresses review comment: the metasrv test template rendered [gc.experimental_soft_drop] enable = true under the generic --enable-gc flag, which non-enterprise metasrv now rejects at startup, making the documented --enable-gc mode unusable in OSS. Keep the flag scoped to plain GC; enterprise soft-drop coverage moves to the enterprise repo. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * fix: gate fresh soft-drop procedures Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * test: gate soft-drop fallback coverage Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * fix: gate soft-drop procedure implementation Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * refactor: gate drop table soft-drop behavior Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * refactor: gate expired soft-drop gc behavior Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * ci: test enterprise table ddl lifecycle Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * chore: mark purge_table as enterprise licensed The purge_table module is compiled only with the enterprise feature, so apply the Enterprise License header and register it with both license header configurations. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * chore: mark recycle_bin as enterprise licensed The recycle_bin module is compiled only with the enterprise feature, so apply the Enterprise License header and register it with both license header configurations. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> * chore: mark soft-drop procedure sources as enterprise licensed The purge and undrop procedure implementations plus the recycle-bin test module compile only with the enterprise feature. Apply the Enterprise License header and register them with both license configurations. Signed-off-by: Lei, HUANG <ratuthomm@gmail.com> --------- Signed-off-by: Lei, HUANG <ratuthomm@gmail.com>
55 lines
2.0 KiB
TOML
55 lines
2.0 KiB
TOML
# Copyright 2023 Greptime Team
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
headerPath = "Apache-2.0.txt"
|
|
|
|
includes = [
|
|
"*.rs",
|
|
"*.py",
|
|
"*.ts",
|
|
]
|
|
|
|
excludes = [
|
|
# copied sources
|
|
"src/common/base/src/readable_size.rs",
|
|
"src/common/base/src/secrets.rs",
|
|
"src/servers/src/repeated_field.rs",
|
|
"src/servers/src/http/test_helpers.rs",
|
|
# enterprise: Apache-2.0 header is NOT applied to these. They are governed by
|
|
# the GreptimeDB Enterprise License and checked via `licenserc-enterprise.toml`.
|
|
# Keep this list in sync with that file's `includes`; enforced by
|
|
# `make check-enterprise-license`.
|
|
# enterprise:start
|
|
"src/common/meta/src/rpc/ddl/trigger.rs",
|
|
"src/operator/src/expr_helper/trigger.rs",
|
|
"src/sql/src/statements/alter/trigger.rs",
|
|
"src/sql/src/statements/create/trigger.rs",
|
|
"src/sql/src/statements/show/trigger.rs",
|
|
"src/sql/src/statements/drop/trigger.rs",
|
|
"src/sql/src/parsers/alter_parser/trigger.rs",
|
|
"src/sql/src/parsers/create_parser/trigger.rs",
|
|
"src/sql/src/parsers/show_parser/trigger.rs",
|
|
"src/mito2/src/extension.rs",
|
|
"src/common/function/src/admin/purge_table.rs",
|
|
"src/catalog/src/system_schema/information_schema/recycle_bin.rs",
|
|
"src/common/meta/src/ddl/purge_dropped_table.rs",
|
|
"src/common/meta/src/ddl/undrop_table.rs",
|
|
"src/catalog/src/system_schema/information_schema/recycle_bin_test.rs",
|
|
# enterprise:end
|
|
]
|
|
|
|
[properties]
|
|
inceptionYear = 2023
|
|
copyrightOwner = "Greptime Team"
|