[MDEV-8150] Random values in I_S.INNODB_TABLESPACES_ENCRYPTION Created: 2015-05-12 Updated: 2015-11-18 Resolved: 2015-11-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation, Encryption |
| Affects Version/s: | 10.1.4 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.1.9-3 | ||||||||
| Description |
|
Note: I don't really know what is right and what is wrong here (see server started with --plugin-load-add=file_key_management.so --file_key_management_filename=/home/elenst/git/10.1/mysql-test/std_data/keys.txt
Note: t_encrypted_non_existing_key will not be created
It does not seem to change with time.
I can't event start guessing why it is the way it is. It also does not change with time. Now, with innodb_encrypt_tables=1 re-create the tables again.
4294967295 for t_not_encrypted_non_existing_key looks ugly.
Nothing else changes, even for tables with default encryption. I don't know if anything should. |
| Comments |
| Comment by Sergei Golubchik [ 2015-11-13 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
I cannot repeat it, here's my test:
And this is the output:
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2015-11-15 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Indeed, there have been some pushes over this time that changed the picture. Still, there is the lack of documentation – at least I can't find "INNODB_TABLESPACES_ENCRYPTION" in the KB, and maybe because of that some questions remain (not necessarily bugs, but things to check). First, with your test above, the result is non-deterministic. Sometimes it's as you pasted (with all zeros in KEYSERVER_REQUESTS), sometimes it has a "1" in KEYSERVER_REQUESTS:
I don't know what this field means, exactly, so cannot figure if it's supposed to be so. Further, my initial complaint had more workflow. If I add to your test set global innodb_encrypt_tables = 1 and wait (I used a sleep 5),
The other way round, starting with innodb_encrypt_tables = 1 and then switching to 0, works in a similar fashion. Could you please take a look whether these results are expected, and if they are, switch the task to Documentation so that the I_S table is properly described somewhere. Note: results above are of 10.1 commit 0dfa0eef596ee677b55976793d632dc9b36928c7 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2015-11-17 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Yes, everything works as expected. Note that your set global innodb_encrypt_tables = 1 doesn't change anything because you don't have background rotation threads (innodb_rotation_threads=0) so tables are not encrypted or decrypted in background. But sleep 5 affects the value in the keyserver_requests column. This column shows (per tablespace) how many times InnoDB has requested an encryption key from the encryption plugin. It needs a key when it writes the to-be-encrypted page on disk. First SELECT happens immediately after the table is created, all pages are still in the buffer pool, not flushed. During the 5-sec pause InnoDB flushes modified pages, it requests the key to encrypt pages before writing them to disk. You can remove set global innodb_encrypt_tables = 1 and only keep sleep 5, the effect will be the same (I tried).
I agree that this is harmless and ugly, let's fix it, but in a separate MDEV. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ian Gilfillan [ 2015-11-18 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This has been documented at https://mariadb.com/kb/en/mariadb/information-schema-innodb_tablespaces_encryption-table/ - the current key version issue mentioned above will be a separate task. |