[digikam] [Bug 341111] New: Deleting an image involves "too many" queries

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

[digikam] [Bug 341111] New: Deleting an image involves "too many" queries

Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

            Bug ID: 341111
           Summary: Deleting an image involves "too many" queries
           Product: digikam
           Version: 4.4.0
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Database
          Assignee: [hidden email]
          Reporter: [hidden email]

Deleting an image from an album with 1K photos requires around 2K queries.
Essentially it reloads the whole album metadata.

Reproducible: Always

Steps to Reproduce:
1.Open an album and start to browser
2.In mysql start to log the query
SET GLOBAL general_log = 'ON';
SET GLOBAL log_output = 'TABLE';
USE mysql;
TRUNCATE TABLE `general_log`;
3.Delete a photo
4.SET GLOBAL general_log = 'OFF';
select * from general_log;

Actual Results:  
The whole album metadata is reloaded

Expected Results:  
Just the image I'm going to see is refreshed.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=341111

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Deleting an image involves  |MYSQL : deleting an image
                   |"too many" queries          |involves "too many" queries
                 CC|                            |[hidden email]

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

Gilles Caulier-4
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Database                    |Database-Mysql

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #1 from [hidden email] ---
This file still valid using last digiKam 5.0.0 ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #2 from [hidden email] ---
Swati,

Do you confirm this file ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #3 from [hidden email] ---
I don't actually find a bug in this condition. I deleted an image and on seeing
the general query log, it included the SQL queries to update the rest of images
in that album. I think this is how it should work.

Could you elaborate "Expected Results:  Just the image I'm going to see is
refreshed."? Since, you've deleted the image, which image are you exactly
talking about?

Thanks.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #4 from [hidden email] ---
Swati,

Are you tried to follow all steps to reproduce described in original post to
trace all queries done while deletion ? How many queries do you see in trace in
this condition ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #5 from [hidden email] ---
Created attachment 100138
  --> https://bugs.kde.org/attachment.cgi?id=100138&action=edit
Queries in trace

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #6 from [hidden email] ---
Yes, I did follow all the steps.

Please find the attachment that includes the queries.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #7 from [hidden email] ---
Conclusion ?
How many queries send to the server for an item removed from an album with 1K
items ?

Gilles

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #8 from [hidden email] ---
Yeah, I got it. You're right about that.

So what would be the "expected result" in such case, involving thousands  of
images in an album ?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #9 from Roy Bellingan <[hidden email]> ---
Hy to all!

I think that the expected result is "no query" at all, we already have all the
info of the folder, so why reload ?

At the time of the bug report my programming knowledge was "scarce", but now I
think I can even try to fix this!

I download now the code and start looking around, do anyone has suggestion on
where to start ?

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #10 from [hidden email] ---
Swati, Roy,

In theory, 2K of request for 1K of items is logic. To display icon view, for
each item, from the database we need :

1/ the image information as comments, tags, rating, labels, GPS, etc.
2/ the thumbnail.

But, we have the cache between icon view and database.

So, i suspect 2 points :

1/ for obscur reason the cache was broken when the report have been written,
2/ the cache was not enough large for 1K items.

I just tested, and i'm sure that at least, cache for thumbnails work fine (100
items here).

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 341111] MYSQL : deleting an image involves "too many" queries

bugzilla_noreply
In reply to this post by Roy Bellingan
https://bugs.kde.org/show_bug.cgi?id=341111

--- Comment #11 from [hidden email] ---
What's about this file using digiKam AppImage bundle 5.4.0 pre release given at
this url :

https://drive.google.com/drive/folders/0BzeiVr-byqt5Y0tIRWVWelRJenM

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.