Skip to content

Commit dd6791c

Browse files
authored
Merge pull request #19401 from ivanvc/fix-deprecation-notices
Fix v3.6 deprecation notices
2 parents f30cbaa + 1f4b3cd commit dd6791c

File tree

3 files changed

+47
-35
lines changed

3 files changed

+47
-35
lines changed

api/v3rpc/rpctypes/error.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ var (
212212
ErrInvalidAuthMgmt = Error(ErrGRPCInvalidAuthMgmt)
213213
ErrClusterIDMismatch = Error(ErrGRPCClusterIDMismatch)
214214
//revive:disable:var-naming
215-
// Deprecated: Please use ErrGRPCClusterIDMismatch.
215+
// Deprecated: Please use ErrClusterIDMismatch.
216216
ErrClusterIdMismatch = ErrClusterIDMismatch
217217
//revive:enable:var-naming
218218

server/embed/config.go

+44-32
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ const (
102102
DefaultLogRotationConfig = `{"maxsize": 100, "maxage": 0, "maxbackups": 0, "localtime": false, "compress": false}`
103103

104104
// ExperimentalDistributedTracingAddress is the default collector address.
105-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use DefaultDistributedTracingAddress instead.
106105
// TODO: delete in v3.7
106+
// Deprecated: Use DefaultDistributedTracingAddress instead. Will be decommissioned in v3.7.
107107
ExperimentalDistributedTracingAddress = "localhost:4317"
108108
// DefaultDistributedTracingAddress is the default collector address.
109109
DefaultDistributedTracingAddress = "localhost:4317"
110110
// ExperimentalDistributedTracingServiceName is the default etcd service name.
111-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use DefaultDistributedTracingServiceName instead.
112111
// TODO: delete in v3.7
112+
// Deprecated: Use DefaultDistributedTracingServiceName instead. Will be decommissioned in v3.7.
113113
ExperimentalDistributedTracingServiceName = "etcd"
114114
// DefaultDistributedTracingServiceName is the default etcd service name.
115115
DefaultDistributedTracingServiceName = "etcd"
@@ -196,19 +196,20 @@ type Config struct {
196196
//revive:disable-next-line:var-naming
197197
WalDir string `json:"wal-dir"`
198198

199-
// SnapshotCount is deprecated in v3.6 and will be decommissioned in v3.7.
199+
// SnapshotCount is the number of committed transactions that trigger a snapshot to disk.
200200
// TODO: remove it in 3.7.
201+
// Deprecated: Will be decommissioned in v3.7.
201202
SnapshotCount uint64 `json:"snapshot-count"`
202203

203204
// ExperimentalSnapshotCatchUpEntries is the number of entries for a slow follower
204205
// to catch-up after compacting the raft storage entries.
205206
// We expect the follower has a millisecond level latency with the leader.
206207
// The max throughput is around 10K. Keep a 5K entries is enough for helping
207208
// follower to catch up.
208-
// Deprecated in v3.6 and will be removed in v3.7.
209209
// TODO: remove in v3.7.
210210
// Note we made a mistake in https://github.com/etcd-io/etcd/pull/15033. The json tag
211211
// `*-catch-up-*` isn't consistent with the command line flag `*-catchup-*`.
212+
// Deprecated: Use SnapshotCatchUpEntries instead. Will be removed in v3.7.
212213
ExperimentalSnapshotCatchUpEntries uint64 `json:"experimental-snapshot-catch-up-entries"`
213214

214215
// SnapshotCatchUpEntries is the number of entires for a slow follower
@@ -218,8 +219,9 @@ type Config struct {
218219
// follower to catch up.
219220
SnapshotCatchUpEntries uint64 `json:"snapshot-catchup-entries"`
220221

221-
// MaxSnapFiles is deprecated in v3.6 and will be decommissioned in v3.7.
222+
// MaxSnapFiles is the maximum number of snapshot files.
222223
// TODO: remove it in 3.7.
224+
// Deprecated: Will be removed in v3.7.
223225
MaxSnapFiles uint `json:"max-snapshots"`
224226
//revive:disable-next-line:var-naming
225227
MaxWalFiles uint `json:"max-wals"`
@@ -407,65 +409,74 @@ type Config struct {
407409

408410
ExperimentalInitialCorruptCheck bool `json:"experimental-initial-corrupt-check"`
409411
// ExperimentalCorruptCheckTime is the duration of time between cluster corruption check passes.
410-
// Deprecated in v3.6 and will be decommissioned in v3.7.
411412
// TODO: delete in v3.7
413+
// Deprecated: Use CorruptCheckTime instead. Will be decommissioned in v3.7.
412414
ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
413-
CorruptCheckTime time.Duration `json:"corrupt-check-time"`
415+
// CorruptCheckTime is the duration of time between cluster corruption check passes.
416+
CorruptCheckTime time.Duration `json:"corrupt-check-time"`
414417
// ExperimentalCompactHashCheckEnabled enables leader to periodically check followers compaction hashes.
415-
// Deprecated in v3.6 and will be decommissioned in v3.7.
416418
// TODO: delete in v3.7
419+
// Deprecated: Use CompactHashCheck Feature Gate. Will be decommissioned in v3.7.
417420
ExperimentalCompactHashCheckEnabled bool `json:"experimental-compact-hash-check-enabled"`
418421
// ExperimentalCompactHashCheckTime is the duration of time between leader checks followers compaction hashes.
419-
// Deprecated in v3.6 and will be decommissioned in v3.7.
420422
// TODO: delete in v3.7
423+
// Deprecated: Use CompactHashCheckTime instead. Will be decommissioned in v3.7.
421424
ExperimentalCompactHashCheckTime time.Duration `json:"experimental-compact-hash-check-time"`
422-
CompactHashCheckTime time.Duration `json:"compact-hash-check-time"`
425+
// CompactHashCheckTime is the duration of time between leader checks followers compaction hashes.
426+
CompactHashCheckTime time.Duration `json:"compact-hash-check-time"`
423427

424428
// ExperimentalEnableLeaseCheckpoint enables leader to send regular checkpoints to other members to prevent reset of remaining TTL on leader change.
425429
ExperimentalEnableLeaseCheckpoint bool `json:"experimental-enable-lease-checkpoint"`
426430
// ExperimentalEnableLeaseCheckpointPersist enables persisting remainingTTL to prevent indefinite auto-renewal of long lived leases. Always enabled in v3.6. Should be used to ensure smooth upgrade from v3.5 clusters with this feature enabled.
427431
// Requires experimental-enable-lease-checkpoint to be enabled.
428-
// Deprecated in v3.6.
429432
// TODO: Delete in v3.7
433+
// Deprecated: To be decommissioned in v3.7.
430434
ExperimentalEnableLeaseCheckpointPersist bool `json:"experimental-enable-lease-checkpoint-persist"`
431435
// ExperimentalCompactionBatchLimit Sets the maximum revisions deleted in each compaction batch.
432-
// Deprecated in v3.6 and will be decommissioned in v3.7.
433436
// TODO: Delete in v3.7
437+
// Deprecated: Use CompactionBatchLimit instead. Will be decommissioned in v3.7.
434438
ExperimentalCompactionBatchLimit int `json:"experimental-compaction-batch-limit"`
435-
CompactionBatchLimit int `json:"compaction-batch-limit"`
439+
// CompactionBatchLimit Sets the maximum revisions deleted in each compaction batch.
440+
CompactionBatchLimit int `json:"compaction-batch-limit"`
436441
// ExperimentalCompactionSleepInterval is the sleep interval between every etcd compaction loop.
437-
// Deprecated in v3.6 and will be decommissioned in v3.7.
438442
// TODO: Delete in v3.7
443+
// Deprecated: Use CompactionSleepInterval instead. Will be decommissioned in v3.7.
439444
ExperimentalCompactionSleepInterval time.Duration `json:"experimental-compaction-sleep-interval"`
440445
// CompactionSleepInterval is the sleep interval between every etcd compaction loop.
441446
CompactionSleepInterval time.Duration `json:"compaction-sleep-interval"`
442447
// ExperimentalWatchProgressNotifyInterval is the time duration of periodic watch progress notifications.
443-
// Deprecated in v3.6 and will be decommissioned in v3.7.
444448
// TODO: Delete in v3.7
449+
// Deprecated: Use WatchProgressNotifyInterval instead. Will be decommissioned in v3.7.
445450
ExperimentalWatchProgressNotifyInterval time.Duration `json:"experimental-watch-progress-notify-interval"`
446-
WatchProgressNotifyInterval time.Duration `json:"watch-progress-notify-interval"`
451+
// WatchProgressNotifyInterval is the time duration of periodic watch progress notifications.
452+
WatchProgressNotifyInterval time.Duration `json:"watch-progress-notify-interval"`
447453
// ExperimentalWarningApplyDuration is the time duration after which a warning is generated if applying request
448454
// takes more time than this value.
449-
// Deprecated in v3.6 and will be decommissioned in v3.7.
450455
// TODO: Delete in v3.7
456+
// Deprecated: Use WarningApplyDuration instead. Will be decommissioned in v3.7.
451457
ExperimentalWarningApplyDuration time.Duration `json:"experimental-warning-apply-duration"`
452-
WarningApplyDuration time.Duration `json:"warning-apply-duration"`
458+
// WarningApplyDuration is the time duration after which a warning is generated if applying request
459+
WarningApplyDuration time.Duration `json:"warning-apply-duration"`
453460
// ExperimentalBootstrapDefragThresholdMegabytes is the minimum number of megabytes needed to be freed for etcd server to
454461
// consider running defrag during bootstrap. Needs to be set to non-zero value to take effect.
455-
// Deprecated in v3.6 and will be decommissioned in v3.7.
456462
// TODO: Delete in v3.7
463+
// Deprecated: Use BootstrapDefragThresholdMegabytes instead. Will be decommissioned in v3.7.
457464
ExperimentalBootstrapDefragThresholdMegabytes uint `json:"experimental-bootstrap-defrag-threshold-megabytes"`
458-
BootstrapDefragThresholdMegabytes uint `json:"bootstrap-defrag-threshold-megabytes"`
465+
// BootstrapDefragThresholdMegabytes is the minimum number of megabytes needed to be freed for etcd server to
466+
BootstrapDefragThresholdMegabytes uint `json:"bootstrap-defrag-threshold-megabytes"`
459467
// WarningUnaryRequestDuration is the time duration after which a warning is generated if applying
460468
// unary request takes more time than this value.
461469
WarningUnaryRequestDuration time.Duration `json:"warning-unary-request-duration"`
462-
// ExperimentalWarningUnaryRequestDuration is deprecated, please use WarningUnaryRequestDuration instead.
470+
// ExperimentalWarningUnaryRequestDuration is the time duration after which a warning is generated if applying
471+
// TODO: Delete in v3.7
472+
// Deprecated: Use WarningUnaryRequestDuration. Will be decommissioned in v3.7.
463473
ExperimentalWarningUnaryRequestDuration time.Duration `json:"experimental-warning-unary-request-duration"`
464474
// ExperimentalMaxLearners sets a limit to the number of learner members that can exist in the cluster membership.
465-
// Deprecated in v3.6 and will be decommissioned in v3.7.
466475
// TODO: Delete in v3.7
476+
// Deprecated: Use MaxLearners instead. Will be decommissioned in v3.7.
467477
ExperimentalMaxLearners int `json:"experimental-max-learners"`
468-
MaxLearners int `json:"max-learners"`
478+
// MaxLearners sets a limit to the number of learner members that can exist in the cluster membership.
479+
MaxLearners int `json:"max-learners"`
469480

470481
// ForceNewCluster starts a new cluster even if previously started; unsafe.
471482
ForceNewCluster bool `json:"force-new-cluster"`
@@ -476,23 +487,23 @@ type Config struct {
476487
ListenMetricsUrlsJSON string `json:"listen-metrics-urls"`
477488

478489
// ExperimentalEnableDistributedTracing indicates if experimental tracing using OpenTelemetry is enabled.
479-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use EnableDistributedTracing instead.
480490
// TODO: delete in v3.7
491+
// Deprecated: Use EnableDistributedTracing instead. Will be decommissioned in v3.7.
481492
ExperimentalEnableDistributedTracing bool `json:"experimental-enable-distributed-tracing"`
482493
// EnableDistributedTracing indicates if tracing using OpenTelemetry is enabled.
483494
EnableDistributedTracing bool `json:"enable-distributed-tracing"`
484495
// ExperimentalDistributedTracingAddress is the address of the OpenTelemetry Collector.
485496
// Can only be set if ExperimentalEnableDistributedTracing is true.
486-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use DistributedTracingAddress instead.
487497
// TODO: delete in v3.7
498+
// Deprecated: Use DistributedTracingAddress instead. Will be decommissioned in v3.7.
488499
ExperimentalDistributedTracingAddress string `json:"experimental-distributed-tracing-address"`
489500
// DistributedTracingAddress is the address of the OpenTelemetry Collector.
490501
// Can only be set if EnableDistributedTracing is true.
491502
DistributedTracingAddress string `json:"distributed-tracing-address"`
492503
// ExperimentalDistributedTracingServiceName is the name of the service.
493504
// Can only be used if ExperimentalEnableDistributedTracing is true.
494-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use DistributedTracingServiceName instead.
495505
// TODO: delete in v3.7
506+
// Deprecated: Use DistributedTracingServiceName instead. Will be decommissioned in v3.7.
496507
ExperimentalDistributedTracingServiceName string `json:"experimental-distributed-tracing-service-name"`
497508
// DistributedTracingServiceName is the name of the service.
498509
// Can only be used if EnableDistributedTracing is true.
@@ -501,8 +512,8 @@ type Config struct {
501512
// This ID must be unique, as helps to distinguish instances of the same service
502513
// that exist at the same time.
503514
// Can only be used if ExperimentalEnableDistributedTracing is true.
504-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use DistributedTracingServiceInstanceID instead.
505515
// TODO: delete in v3.7
516+
// Deprecated: Use DistributedTracingServiceInstanceID instead. Will be decommissioned in v3.7.
506517
ExperimentalDistributedTracingServiceInstanceID string `json:"experimental-distributed-tracing-instance-id"`
507518
// DistributedTracingServiceInstanceID is the ID key of the service.
508519
// This ID must be unique, as helps to distinguish instances of the same service
@@ -511,17 +522,17 @@ type Config struct {
511522
DistributedTracingServiceInstanceID string `json:"distributed-tracing-instance-id"`
512523
// ExperimentalDistributedTracingSamplingRatePerMillion is the number of samples to collect per million spans.
513524
// Defaults to 0.
514-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use DistributedTracingSamplingRatePerMillion instead.
515525
// TODO: delete in v3.7
526+
// Deprecated: Use DistributedTracingSamplingRatePerMillion instead. Will be decommissioned in v3.7.
516527
ExperimentalDistributedTracingSamplingRatePerMillion int `json:"experimental-distributed-tracing-sampling-rate"`
517528
// DistributedTracingSamplingRatePerMillion is the number of samples to collect per million spans.
518529
// Defaults to 0.
519530
DistributedTracingSamplingRatePerMillion int `json:"distributed-tracing-sampling-rate"`
520531

521532
// ExperimentalPeerSkipClientSanVerification determines whether to skip verification of SAN field
522533
// in client certificate for peer connections.
523-
// Deprecated in v3.6 and will be decommissioned in v3.7.
524534
// TODO: Delete in v3.7
535+
// Deprecated: Use `peer-skip-client-san-verification` instead. Will be decommissioned in v3.7.
525536
ExperimentalPeerSkipClientSanVerification bool `json:"experimental-peer-skip-client-san-verification"`
526537

527538
// Logger is logger options: currently only supports "zap".
@@ -559,8 +570,8 @@ type Config struct {
559570
UnsafeNoFsync bool `json:"unsafe-no-fsync"`
560571

561572
// ExperimentalDowngradeCheckTime is the duration between two downgrade status checks (in seconds).
562-
// Deprecated in v3.6 and scheduled to be removed in v3.7.
563573
// TODO: Delete `ExperimentalDowngradeCheckTime` in v3.7.
574+
// Deprecated: Use DowngradeCheckTime instead. Will be decommissioned in v3.7.
564575
ExperimentalDowngradeCheckTime time.Duration `json:"experimental-downgrade-check-time"`
565576
// DowngradeCheckTime is the duration between two downgrade status checks (in seconds).
566577
DowngradeCheckTime time.Duration `json:"downgrade-check-time"`
@@ -574,8 +585,8 @@ type Config struct {
574585
MemoryMlock bool `json:"memory-mlock"`
575586

576587
// ExperimentalMemoryMlock enables mlocking of etcd owned memory pages.
577-
// Deprecated in v3.6 and will be decommissioned in v3.7. Use MemoryMlock instead.
578588
// TODO: Delete in v3.7
589+
// Deprecated: Use MemoryMlock instad. To be decommissioned in v3.7.
579590
ExperimentalMemoryMlock bool `json:"experimental-memory-mlock"`
580591

581592
// ExperimentalTxnModeWriteWithSharedBuffer enables write transaction to use a shared buffer in its readonly check operations.
@@ -585,8 +596,9 @@ type Config struct {
585596
ExperimentalStopGRPCServiceOnDefrag bool `json:"experimental-stop-grpc-service-on-defrag"`
586597

587598
// V2Deprecation describes phase of API & Storage V2 support.
588-
// Deprecated and scheduled for removal in v3.8.
589599
// Do not set this field for embedded use cases, as it has no effect. However, setting it will not cause any harm.
600+
// TODO: Delete in v3.8
601+
// Deprecated: The default value is enforced, to be removed in v3.8.
590602
V2Deprecation config.V2DeprecationEnum `json:"v2-deprecation"`
591603

592604
// ServerFeatureGate is a server level feature gate

server/features/etcd_features.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ const (
6767
LeaseCheckpoint featuregate.Feature = "LeaseCheckpoint"
6868
// LeaseCheckpointPersist enables persisting remainingTTL to prevent indefinite auto-renewal of long lived leases. Always enabled in v3.6. Should be used to ensure smooth upgrade from v3.5 clusters with this feature enabled.
6969
// Requires EnableLeaseCheckpoint featuragate to be enabled.
70-
// Deprecated in v3.6.
7170
// TODO: Delete in v3.7
7271
// owner: @serathius
7372
// alpha: v3.6
7473
// main PR: https://github.com/etcd-io/etcd/pull/13508
74+
// Deprecated: Enabled by default in v3.6, to be removed in v3.7.
7575
LeaseCheckpointPersist featuregate.Feature = "LeaseCheckpointPersist"
7676
)
7777

@@ -87,7 +87,7 @@ var (
8787
}
8888
// ExperimentalFlagToFeatureMap is the map from the cmd line flags of experimental features
8989
// to their corresponding feature gates.
90-
// Deprecated: only add existing experimental features here. DO NOT use for new features.
90+
// Deprecated: Only add existing experimental features here. DO NOT use for new features.
9191
ExperimentalFlagToFeatureMap = map[string]featuregate.Feature{
9292
"experimental-stop-grpc-service-on-defrag": StopGRPCServiceOnDefrag,
9393
"experimental-initial-corrupt-check": InitialCorruptCheck,

0 commit comments

Comments
 (0)