mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Merge 9815cedd63
into bb22736bc3
This commit is contained in:
commit
f0eb301eec
@ -57,7 +57,7 @@ namespace ErrorCodes
|
||||
extern const int NO_SUCH_DATA_PART;
|
||||
extern const int ABORTED;
|
||||
extern const int SUPPORT_IS_DISABLED;
|
||||
extern const int TABLE_IS_READ_ONLY;
|
||||
extern const int UNSUPPORTED_METHOD;
|
||||
}
|
||||
|
||||
namespace ActionLocks
|
||||
@ -2526,7 +2526,7 @@ PreparedSetsCachePtr StorageMergeTree::getPreparedSetsCache(Int64 mutation_id)
|
||||
void StorageMergeTree::assertNotReadonly() const
|
||||
{
|
||||
if (isStaticStorage())
|
||||
throw Exception(ErrorCodes::TABLE_IS_READ_ONLY, "Table is in readonly mode due to static storage");
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Table is in readonly mode due to static storage");
|
||||
}
|
||||
|
||||
void StorageMergeTree::fillNewPartName(MutableDataPartPtr & part, DataPartsLock &)
|
||||
|
@ -193,6 +193,7 @@ namespace ErrorCodes
|
||||
extern const int SUPPORT_IS_DISABLED;
|
||||
extern const int FAULT_INJECTED;
|
||||
extern const int CANNOT_FORGET_PARTITION;
|
||||
extern const int UNSUPPORTED_METHOD;
|
||||
}
|
||||
|
||||
namespace ActionLocks
|
||||
@ -4776,7 +4777,7 @@ bool StorageReplicatedMergeTree::fetchPart(
|
||||
bool try_fetch_shared)
|
||||
{
|
||||
if (isStaticStorage())
|
||||
throw Exception(ErrorCodes::TABLE_IS_READ_ONLY, "Table is in readonly mode due to static storage");
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Table is in readonly mode due to static storage");
|
||||
|
||||
auto zookeeper = zookeeper_ ? zookeeper_ : getZooKeeper();
|
||||
const auto part_info = MergeTreePartInfo::fromPartName(part_name, format_version);
|
||||
@ -5629,7 +5630,7 @@ void StorageReplicatedMergeTree::assertNotReadonly() const
|
||||
if (is_readonly)
|
||||
throw Exception(ErrorCodes::TABLE_IS_READ_ONLY, "Table is in readonly mode (replica path: {})", replica_path);
|
||||
if (isStaticStorage())
|
||||
throw Exception(ErrorCodes::TABLE_IS_READ_ONLY, "Table is in readonly mode due to static storage");
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Table is in readonly mode due to static storage");
|
||||
}
|
||||
|
||||
|
||||
@ -5639,7 +5640,7 @@ SinkToStoragePtr StorageReplicatedMergeTree::write(const ASTPtr & /*query*/, con
|
||||
throw Exception(ErrorCodes::NOT_INITIALIZED, "Table is not initialized yet");
|
||||
|
||||
if (isStaticStorage())
|
||||
throw Exception(ErrorCodes::TABLE_IS_READ_ONLY, "Table is in readonly mode due to static storage");
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Table is in readonly mode due to static storage");
|
||||
/// If table is read-only because it doesn't have metadata in zk yet, then it's not possible to insert into it
|
||||
/// Without this check, we'll write data parts on disk, and afterwards will remove them since we'll fail to commit them into zk
|
||||
/// In case of remote storage like s3, it'll generate unnecessary PUT requests
|
||||
|
Loading…
Reference in New Issue
Block a user