[MDEV-8155] Revise the variable/option innodb_encryption_threads Created: 2015-05-13  Updated: 2015-10-29  Resolved: 2015-10-29

Status: Closed
Project: MariaDB Server
Component/s: Encryption
Fix Version/s: N/A

Type: Task Priority: Minor
Reporter: Elena Stepanova Assignee: Sergei Golubchik
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

From the documentation (https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_encryption_threads) it appears that the corresponding threads do key rotation and scrubbing, but not the encryption as such.

Maybe it should be renamed then?

Of course, it's not easy to find a good name because (again, from the description) the same set of threads perform seemingly unrelated operations. Shouldn't it be split into two, one for scrubbing and another one for key rotation?



 Comments   
Comment by Sergei Golubchik [ 2015-05-13 ]

"key rotation" means that the thread reads tablespace page by page, decrypts pages that were encrypted with the old key and encrypts them with the new key. So it does encryption, yes. Also if there was no old key, this thread will encrypt the (previously not encrypted) tablespace. And if there is no new key, the thread will decrypt the (previously encrypted) tablespace.

And it can also do scrubbing.

What can it be renamed to? "Background page rewriting thread"?

Comment by Elena Stepanova [ 2015-05-14 ]

But if there is no key rotation, and the value innodb_encryption_threads = 0, encryption itself will still be happening when requested (via a table option or innodb_encrypt_tables variable), right?
That's when the name becomes confusing.
Same way, scrubbing will not be happening if innodb_encryption_threads = 0, even though scrubbing seems to have its own group of options.
It's a bit less confusing than the first part, but still.

I'm terrible with names, variable names included, so I can't come up with a good one. Maybe we should ask somebody for a second/third/fourth etc. opinion?

Comment by Sergei Golubchik [ 2015-05-15 ]

If innodb_encryption_threads = 0 then encryption will still be happening for page writes — that is for new pages or when an existing page is updated. But existing tables with ENCRYPTED=DEFAULT won't automatically become encrypted when innodb_encrypt_tables enabled.

Sure, let's ask. greenman, dbart — what do you think of that?

Comment by Daniel Bartholomew [ 2015-05-15 ]

Key rotation and scrubbing seem to both be encryption-related operations that need to be managed, so my first thought is to rename it to innodb_encryption_management_threads but I'm not sure if that successfully encapsulates what this option does.

Comment by Sergei Golubchik [ 2015-05-15 ]

The way I see it, scrubbing is not really related to encryption. See https://mariadb.com/kb/en/mariadb/xtradb-innodb-data-scrubbing/

Generated at Thu Feb 08 07:25:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.