You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/11/14 00:51:27 UTC

[GitHub] [accumulo] ctubbsii opened a new issue #1430: Limit the size of new table names

ctubbsii opened a new issue #1430: Limit the size of new table names
URL: https://github.com/apache/accumulo/issues/1430
 
 
   Giant table names can take down ZooKeeper and the master server. There should be a reasonable limit on table name sizes. This can be imposed on the server side for creating tables, renaming tables, and cloning tables. Existing tables need not be affected.
   
   Client code can be updated for fast-failure (and to limit the number of invalid requests sent to the server-side).
   
   For reference, the information I found while searching the web (not necessarily accurate, but good enough to give us an idea) gives the following limits to identifier sizes:
   
   | Item | Number of characters (or sometimes, bytes) |
   | ---- | ---- |
   | Oracle DB table names | 30 |
   | MySQL table names | 64 |
   | PostgreSQL table names | 63 |
   | DNS identifier | 63 |
   | Most filesystem file names (EXT/XFS/ZFS/exFAT/HFS+/Brtfs/NTFS | 255 |
   | EXT4 max path | 4096 |
   | Java identifiers | unlimited |
   | longest English word | 45 |
   | "supercalifragilisticexpialidocious" | 34 |
   
   My original opinion was 63, because this is what DNS uses, and because it is similar to what common relational databases use which, like us, have a very DNS-like naming convention of dot-separated components, as in `namespace.tablename` or `database.tablename`
   
   However, I think that's probably going to be too limiting, so I think 255 is a more reasonable limit.
   
   The server-side code for validating table names is located in the `FateServiceHandler` class, in a method called `validateTableNameArgument`. However, that method is currently being used for existing tables, in order to validate the parameters sent over the wire to the server. A similar method would have to be created to specifically validate *new* destination table names from creating, renaming, or cloning a table. That way, we don't impose the name limit on existing tables, only on new ones. For existing tables, it may be worth adding a warning log message to the current validator method that the table name is longer than what Accumulo now supports, and it may cause unexpected behavior if not renamed to something shorter.
   
   (Originally reported at [ACCUMULO-2366](https://issues.apache.org/jira/browse/ACCUMULO-2366))

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services