[MCOL-3495] S3 ColumnStore should check for S3 configuration at startup if S3 is used Created: 2019-09-10  Updated: 2023-10-26  Resolved: 2019-10-08

Status: Closed
Project: MariaDB ColumnStore
Component/s: ?
Affects Version/s: 1.4.0
Fix Version/s: Icebox

Type: Bug Priority: Major
Reporter: Daniel Lee (Inactive) Assignee: Ben Thompson (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None


 Description   

Build tested: 1.4.0-1

server commit:
67452bc
engine commit:
64ceb86

I installed MCS using S3 local storage and switched to S3 cloud storage, MCS still works. This is probably because I tested only a small table and data is in local cache. I have seen queries failed due to missing objects.

Since MCS does not support such S3 storage type switching, we should do

1. postConfigure should save the storage type (localStorage or S3) in the ColumnStore.xml file
2. during subsequent system startup, it should check to see if storage type in storageManager.cnf matches that in ColumnStore.xml. If not matched, error should be return and system should not come up.
3. even better, we should keep track of the region and bucket name (for AWS)

The following are the steps for my test

1. installed MCS using S3 local storage
2. created and load orders table
3. executed query
4. shutdownsystem
5. modified storagemanager.cnf to use AWS S3 storage (AWS S3 bucket is empty)
6. startsystem
7. exeuted query (query still worked)
8. data files appeared in AWS S3 bucket



 Comments   
Comment by Ben Thompson (Inactive) [ 2019-10-03 ]

Its documented within S3 to not change the storage location after postConfigure is run. Not much to do here, nothing blocks the user from changing this while system is shutdown. Changing while active will do nothing as it is only loaded at process startup. The query would work after restart because whatever is in cache would work. and that cache would get pushed to cloud when restarted. behavior here is undefined though as the cnf file states. Seems you got lucky that table worked because of large cache size and small table size.

from storagemanger.cnf file:

[ObjectStorage]
# 'service' is the module that SM will use for cloud IO.
# Current options are “LocalStorage” and “S3”.
# ‘LocalStorage’ will use a directory on the local filesystem as if it
# were cloud storage.  ‘S3’ is the module that uses real cloud storage.
# Both modules have their own sections below.
#
# Note, changing this after running postConfigure will leave you with an
# an inconsistent view of the data.
service = LocalStorage

Comment by Andrew Hutchings (Inactive) [ 2019-10-08 ]

Closing because there is documentation around this. It would also be extremely difficult to solve and it is something no user should ever try and do. Daniel's solution would not catch every case.

Generated at Thu Feb 08 02:43:09 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.