Comments (12)
I got a few minutes today to just pull the config through:
#17877
will add more tests in a bit, you guys can have a look in the meantime 👍
from etcd.
@Scotchman0, it may be helpful if you can add the current output to compare to your suggestion.
/assign @Scotchman0
from etcd.
updated the initial with the comparative of what we've got now versus proposed change - I'm open to separating by column; fairly easy to make those a separate block instead of joining.
from etcd.
Would it be easier to put the storage information as usage 5.6/6.7 GB (18%)
?
I would be also interested if we could quota somewhere, not sure it's accessible via API.
from etcd.
I agree it's a minor enhancement, but on other hand, it's minor breaking on the user experience. I like the idea of adding a separate new column.
I wonder if it would be better to add more columns rather than reusing/multi-purposing the current column
Makes sense to me.
I would be also interested if we could quota somewhere, not sure it's accessible via API.
Not sure I got the point. Do you mean that etcdserver also returns storage quota (e.g. 2GiB) to client when users run etcdctl endpoint status
? If yes, I definitely support it. Once it's supported, then we can remove --etcd-storage-quota-bytes from the etcd-defrag tool :)
from etcd.
I like the idea, but after seeing the implementation, I wonder if it would be better to add more columns rather than reusing/multi-purposing the current column. I defer to @ahrtr / @serathius with their point of view.
from etcd.
alternative implementation with separate columns for comparison might look like the following if it's desirable to segment instead of conjoin an output block:
+-----------------------------+------------------+---------+----------------+----------+-----------+------------+-----------+------------+--------------------+--------+
| ENDPOINT | ID | VERSION | DB SIZE | IN USE | NOT USED | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
+-----------------------------+------------------+---------+----------------+----------+-----------+------------+-----------+------------+--------------------+--------+
| https://xxx.xxx.xxx:2379 | 1fc63d8d0eb5fa7b | 3.5.9 | 6.7 GB | 5.6 GB | 18% | false | false | 5853 | 4073918326 | 4073918326 | |
| https://xxx.xxx.xxx:2379 | 3bd2d35c028a6a2f | 3.5.9 | 6.8 GB | 5.6 GB | 19% | true | false | 5853 | 4073918327 | 4073918327 | |
| https://xxx.xxx.xxx:2379 | 41cbbc084d60007d | 3.5.9 | 6.8 GB | 5.6 GB | 18% | false | false | 5853 | 4073918330 | 4073918330 | |
+-----------------------------+------------------+---------+----------------+----------+-----------+------------+-----------+------------+--------------------+--------+
from etcd.
I went ahead and modified the PR #17871 to include separated columns for each output + a new block for Quota pending #17877 approval/merge to reference the new quota block: might look like the below:
+-----------------------------+------------------+---------+----------------+----------+-----------+------------+-----------+------------+--------------------+--------+
| ENDPOINT | ID | VERSION | DB SIZE | IN USE | NOT USED | QUOTA | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
+-----------------------------+------------------+---------+----------------+----------+-----------+------------+-----------+------------+--------------------+--------+
| https://xxx.xxx.xxx:2379 | 1fc63d8d0eb5fa7b | 3.5.9 | 6.7 GB | 5.6 GB | 18% | ?? | false | false | 5853 | 4073918326 | 4073918326 | |
| https://xxx.xxx.xxx:2379 | 3bd2d35c028a6a2f | 3.5.9 | 6.8 GB | 5.6 GB | 19% | ?? | true | false | 5853 | 4073918327 | 4073918327 | |
| https://xxx.xxx.xxx:2379 | 41cbbc084d60007d | 3.5.9 | 6.8 GB | 5.6 GB | 18% | ?? | false | false | 5853 | 4073918330 | 4073918330 | |
+-----------------------------+------------------+---------+----------------+----------+-----------+------------+-----------+------------+--------------------+---------
from etcd.
I agree it's a minor enhancement, but on other hand, it's minor breaking on the user experience.
Human readable table is not an API. We don't guarantee column names or contents. It should be different to other formats like json, but table is not parsable and it should not be so.
from etcd.
Human readable table is not an API.
API
!= user experience
. API
is part of user experience
. Since it doesn't change the json format which is usually parsed by program, so it's the reason why I call it a minor breaking.
from etcd.
Just an update to indicate the PR is cleaned/approved for final eyes/checks/thoughts here.
./etcd --quota-backend-bytes '10737418240'
sunbro@apollo ~/Downloads/etcd/bin patch-1 ./etcdctl endpoint status -w table
+----------------+------------------+---------------+-----------------+---------+--------+-----------------------+-------+-----------+------------+-----------+------------+--------------------+--------+
| ENDPOINT | ID | VERSION | STORAGE VERSION | DB SIZE | IN USE | PERCENTAGE NOT IN USE | QUOTA | IS LEADER | IS LEARNER | RAFT TERM | RAFT INDEX | RAFT APPLIED INDEX | ERRORS |
+----------------+------------------+---------------+-----------------+---------+--------+-----------------------+-------+-----------+------------+-----------+------------+--------------------+--------+
| 127.0.0.1:2379 | 8e9e05c52164694d | 3.6.0-alpha.0 | 3.6.0 | 20 kB | 16 kB | 20% | 11 GB | true | false | 3 | 8 | 8 | |
+----------------+------------------+---------------+-----------------+---------+--------+-----------------------+-------+-----------+------------+-----------+------------+--------------------+--------+
./etcdctl endpoint status -w json
[{"Endpoint":"127.0.0.1:2379","Status":{"header":{"cluster_id":14841639068965178418,"member_id":10276657743932975437,"revision":1,"raft_term":3},"version":"3.6.0-alpha.0","dbSize":20480,"leader":10276657743932975437,"raftIndex":8,"raftTerm":3,"raftAppliedIndex":8,"dbSizeInUse":16384,"storageVersion":"3.6.0","dbSizeQuota":10737418240}}]
from etcd.
Done in #17871
from etcd.
Related Issues (20)
- HashKV should compute the hash of all MVCC keys up to a given revision HOT 6
- Completion command is not included in releases of etcdctl HOT 1
- Etcd compilation process error HOT 4
- Etcd send a corrupt snapshot or missing hash snapshot to a snapshot api call which causes the restoration to fail. HOT 7
- option go_package in proto files HOT 4
- Client v3 and GRPC versions conflict HOT 3
- Member remains learner after promotion HOT 1
- Improvement of OpenSSF Scorecard Score HOT 4
- Enable `unexported-return` linter rule HOT 7
- High memory usage (memory leak?) with 1 node cluster and small DB (but a lot of updates) HOT 8
- The second node took about 7 seconds to join in a single node cluster HOT 9
- Add hashKV checking to robustness test HOT 8
- Introduce a Go workspace HOT 2
- Need to update golang pkg.dev document HOT 4
- support compile `tools` in makefile HOT 2
- Detected disallowed custom content in v2store
- Confusing documentation for `WatchResponse.canceled`
- etcd cluster crash
- Bump Go to 1.21.13/1.22.6 HOT 10
- etcd Go & Java client SDK's retry mechanism may break `Serializable` HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etcd.