[MCOL-311] utility for finding objects file Created: 2016-09-23  Updated: 2023-10-26  Resolved: 2016-12-08

Status: Closed
Project: MariaDB ColumnStore
Component/s: None
Affects Version/s: 1.0.3
Fix Version/s: 1.0.6

Type: New Feature Priority: Critical
Reporter: David Thompson (Inactive) Assignee: David Hall (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Sprint: 2016-21, 2016-22, 2016-23, 2016-24

 Description   

A utility should provide a means of determing the directory for the first file of a given object. This is useful for troubleshooting.

Arguments:

  • oid / object id
  • verbose flag for more details


 Comments   
Comment by David Thompson (Inactive) [ 2016-10-25 ]

This should be implemented as an mcsadmin function, e.g named findObjectFile. It should take the following set of arguments (either / or):

  • OID
  • Database Name, Table Name (performing an intermediate OID lookup).
Comment by David Hall (Inactive) [ 2016-11-14 ]

For review

Comment by David Thompson (Inactive) [ 2016-11-24 ]

Pull request was never merged..

Comment by David Hill (Inactive) [ 2016-11-24 ]

reviewed, all looks good

Comment by David Hill (Inactive) [ 2016-11-30 ]

needs to be merged

Comment by Daniel Lee (Inactive) [ 2016-12-01 ]

Build tested: nightly build targeted for 1.0.6

[root@localhost mariadb-columnstore-server]# git status

  1. On branch develop
    nothing to commit, working directory clean
    [root@localhost mariadb-columnstore-server]# dit show
    -bash: dit: command not found
    [root@localhost mariadb-columnstore-server]# git show
    commit 3795bd4cf42d59b792c473101703911fb53e9297
    Merge: 570184c 84714c9
    Author: dhall-InfiniDB <david.hall@mariadb.com>
    Date: Wed Nov 30 11:42:14 2016 -0600

Merge pull request #18 from mariadb-corporation/MCOL-424

MCOL-424 Disable indexes for cross-engine

[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 691c52ca3364d968d2fa378284e45aca694785ec
Merge: d4d9be6 fbb02f5
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Thu Dec 1 11:57:45 2016 -0600

Merge pull request #64 from mariadb-corporation/MCOL-307

MCOL-307 Need path to we_redistributedef.h. The path isn't in everyon…

----------
Found few issues as the following:

1) incorrect command name of "getDatafileName" is returned

Current:

mcsadmin> findobjectfile
findobjectfile Thu Dec 1 21:49:17 2016

getDatafileName requires one of
a) oid of column for which file name is to be retrieved
b) schema, table and column for which file name is to be retrieved

2) When supplied with an table object ID, which is not associated with any data file, it still outputs an directory. "OID directory not found" is too alarming, suggesting that a directory is missing. Also "file name" should be "Path" or 'Directory name".

Current:

mcsadmin> findobjectfile 3004
findobjectfile Thu Dec 1 21:50:10 2016
file name for oid 3004:
/usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/188.dir (OID directory not found)

Suggestion:

OID=3004 Object=[schemaName.tableName]
This command returns the directory for a column only.

3) When supplied with an invalid OID, it should indicate as such.

Current:

mcsadmin> findobjectfile 30050
findobjectfile Thu Dec 1 22:04:13 2016
file name for oid 30050:
/usr/local/mariadb/columnstore/data1/000.dir/000.dir/117.dir/098.dir (OID directory not found)

Suggestion:
OID=30050 Object=n/a
The supplied OID is invalid.

4) When column OID is supplied, we should return the object name as a confirmation for the user, since the OID itself is meaningless.

Current:

findobjectfile Thu Dec 1 21:51:18 2016
file name for oid 3005:
/usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/189.dir

Suggestion:
OID=3005 Object=[schemaName.tableName.columnName]
/usr/local/mariadb/columnstore/data1/000.dir/000.dir/011.dir/189.dir

Comment by David Hall (Inactive) [ 2016-12-06 ]

Made the changes as requested by QA. There's a new pull request.

Comment by David Hill (Inactive) [ 2016-12-07 ]

review looks good based on Daniels request...

Testing, I asked this before so need to make sure what happens in the test phase.

Does this command on a separate system when run on a um and a pm asking for the same info on a OID...

Comment by Daniel Lee (Inactive) [ 2016-12-07 ]

Build verified: Github source
[root@localhost mariadb-columnstore-server]# git show
commit 8592d353c5477940f9600566639302de9fa994c7
Merge: 3795bd4 7af4e57
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Tue Dec 6 09:49:03 2016 -0600
Merge pull request #20 from mariadb-corporation/MCOL-441
MCOL-441 Fix segfault on SP error
[root@localhost mariadb-columnstore-server]# cd mariadb-columnstore-engine/
[root@localhost mariadb-columnstore-engine]# git show
commit 7a8322dc28471b830aca243698cd7fce5bc4401c
Merge: 5c0ced8 9b6beb4
Author: dhall-InfiniDB <david.hall@mariadb.com>
Date: Wed Dec 7 10:10:22 2016 -0600
Merge pull request #73 from mariadb-corporation/MCOL-435
Mcol 435

Still having couple issues.

1) table object returned the first column of the table.

mcsadmin> findobjectfile 3147
findobjectfile Wed Dec 7 17:50:34 2016
for table OID 3147:
column OID 3148 tpch1c.nation.n_nationkey
/usr/local/mariadb/columnstore/data1/000.dir/000.dir/012.dir/076.dir

2) OID for dictionary column treated as invalid OID (3153 is the OID for n_comment dictionary)
mcsadmin> findobjectfile 3153
findobjectfile Wed Dec 7 17:41:43 2016
OID 3153 does not represent a table or column in columnstore

Comment by Daniel Lee (Inactive) [ 2016-12-07 ]

Per my last comment, couple issues identified.

Comment by David Hall (Inactive) [ 2016-12-07 ]

I opened MCOL-451 to address the dictionary oid issue because it most likely won't be in 1.0.6.

The complaint about table oids returning the first column file name. This is intentional (though not documented). What behavior should it be for a table oid? There are no data files associated with a table, only with columns.

Comment by David Hall (Inactive) [ 2016-12-08 ]

Added the concept of reporting for all columns when table name or table oid are entered to MCOL-451.

Comment by David Hall (Inactive) [ 2016-12-08 ]

The concerns of QA are addressed in MCOL-451. Closing this.

Comment by Daniel Lee (Inactive) [ 2016-12-08 ]

I suggest to output a message stating that the supplied OID is for the table object and not to output a path since there is none.

It is not good to return something else when the requested info is not found. That makes the result unpredictable and hard for user to script to account for that.

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