From: Smart W. G. F. W. <f.w...@sm...> - 2008-04-07 09:59:42
|
Hi, Stef Bon schrieb: >> >> now I can check the flow of what happens (by activating debugging). It's >> much more clear now. >> >> But when I look at query_inode_full, I do not understand what happens >> there at all. >> The purpose of this function is to translate a path into a inode, right? >> But it does much more things. >> It "returns" a table nlinks, the inode, the parent. (and more?) >> >> Can someone explain why this is? It runs complicated queries.... >> > > Ok, > > now I've read it a couple of times, I understand it more or less. > > A (long) query is constructed to determine the inode, with the help of a > LEFT JOIN. > > This query does grow bigger as the path is longer (deeper). > > I'm looking into the mysql syntax now. Any hints about it welcome. > Yes, the query grows bigger, and it is executed every time a lstat() or lstat64() syscall happens - which makes performance really bad on ndbcluster with distributed clients on different locations. We should cache it somewhere (either in mysqlfs_getattr, or as cache somewhere in query_inode_full. the cache must be cleared for the inode, if write/rename or chown/chmod is executed so that query_inode_full always returns proper values. i thought about that inode-cache - it shouldn't be more than an array containing values which has to be checked before the query is run. as for the locking-problem, what about creating a table metadata to store information on which inode is currently locked? metadata could also be stored with ndbcluster-engine, and thus we would easily be able to implement file locking. -- Mit freundlichen Grüßen, Florian Wiessner Smart Weblications GmbH Martinsberger Str. 1 D-95119 Naila fon.: +49 700 762 789 32 - 0,12 EUR/Min* fax.: +49 700 762 789 32 - 0,12 EUR/Min* 24/7: +49 900 311 886 00 - 1,99 EUR/Min* http://www.smart-weblications.de -- Sitz der Gesellschaft: Naila Geschäftsführer: Florian Wiessner HRB-Nr.: HRB 3840 Amtsgericht Hof *aus dem dt. Festnetz, ggf. abweichende Preise aus dem Mobilfunknetz |