problems with digikam3.db into a nefs partition

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: problems with digikam3.db into a nefs partition

Fabien-5
Hi,

Gilles Caulier wrote:
>
> In all case i think than using a NFS mount point like a root album
> library path is wrong, because there is a risk to have 2 instance of
> digiKAm running on 2 different computers witch open the database in R/W.
> In this case, the concurrent writting on DB will corrupt the data.

Well, this shouldn't happen as the nfs server should lock the file. At
least, it works for me (I must be lucky :) )...
But, I agree with you that this can lead to some errors and corruptions.

>
> The database file must be stored in all case in local.

Yes, but sometime, it's not possible (eg: homedir automounted from a NFS
server and no dedicated pc).

> The way to have a
> link on NFS mount path like a subfolder of the root album library path
> is an easy solution. each computer have a dedicaced database file in
> local. No problem with NFS, no concurrent acess to DB.

Easy but ugly solution : if you do that, you will see only one album
with many subalbums.
I still think my proposal (adding -f cmdline option to specify the path
to digikam db) would be the right solution, not only to address this
problem but also about other possibilities it offers (read-only media,
etc...).
I would like to be able to propose a patch, but unfortunately I can't :(
It's a pity, because it doesn't sound very difficult to do (well, I
would know how to do that in some languages :) ).

--
Fabien

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with digikam3.db into a nefs partition

Arnd Baecker
On Thu, 8 Mar 2007, Fabien wrote:

[...]

> I still think my proposal (adding -f cmdline option to specify the path
> to digikam db) would be the right solution, not only to address this
> problem but also about other possibilities it offers (read-only media,
> etc...).
> I would like to be able to propose a patch, but unfortunately I can't :(
> It's a pity, because it doesn't sound very difficult to do (well, I
> would know how to do that in some languages :) ).

I know how you feel ;-)

Looking at
  digikam/digikam/main.cpp
it might be easily possible to add
a command-line option to specify the "Album Path"
(normally given in .kde/share/config/digikamrc)

However, I would not know how to separate the
location of the "Album Path"/digikam3.db and the
"Album Path"/ImageFolders.
This looks like a more invasive change ...

Best, Arnd
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with digikam3.db into a nefs partition

Fabien-5
Arnd Baecker wrote:

> On Thu, 8 Mar 2007, Fabien wrote:
>
> [...]
>
>>I still think my proposal (adding -f cmdline option to specify the path
>>to digikam db) would be the right solution, not only to address this
>>problem but also about other possibilities it offers (read-only media,
>>etc...).
>>I would like to be able to propose a patch, but unfortunately I can't :(
>>It's a pity, because it doesn't sound very difficult to do (well, I
>>would know how to do that in some languages :) ).
>
> I know how you feel ;-)

:)

> Looking at
>   digikam/digikam/main.cpp
> it might be easily possible to add
> a command-line option to specify the "Album Path"
> (normally given in .kde/share/config/digikamrc)

Ok, good to know that !

> However, I would not know how to separate the
> location of the "Album Path"/digikam3.db and the
> "Album Path"/ImageFolders.
> This looks like a more invasive change ...


Well, I don't think so (I hope). Look here :
<http://bugs.kde.org/show_bug.cgi?id=137694#c5>

Only 3 files refer to this :
<<
digikam/albummanager.cpp:    QString dbPath = cleanPath + "/digikam3.db";
digikam/upgradedb_sqlite2tosqlite3.cpp:    QString newDB= libraryPath +
"/digikam3.db";
kioslave/sqlitedb.cpp:    QString dbPath = directory + "/digikam3.db";
 >>

I already tried to hardcode another path and it worked perfectly...

--
Fabien

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: problems with digikam3.db into a nefs partition

Arnd Baecker
On Thu, 8 Mar 2007, Fabien wrote:

> Arnd Baecker wrote:
[...]

> > However, I would not know how to separate the
> > location of the "Album Path"/digikam3.db and the
> > "Album Path"/ImageFolders.
> > This looks like a more invasive change ...
>
>
> Well, I don't think so (I hope). Look here :
> <http://bugs.kde.org/show_bug.cgi?id=137694#c5>
>
> Only 3 files refer to this :
> <<
> digikam/albummanager.cpp:    QString dbPath = cleanPath + "/digikam3.db";
> digikam/upgradedb_sqlite2tosqlite3.cpp:    QString newDB= libraryPath +
> "/digikam3.db";
> kioslave/sqlitedb.cpp:    QString dbPath = directory + "/digikam3.db";
>  >>
>
> I already tried to hardcode another path and it worked perfectly...

Hmm, but in all these three cases the directories
`cleanPath`, `libraryPath` and `directory` are given
as argument to the function in which they are used.
Therefore one has to track down first, where these functions
are invoked...

Arnd
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12