Virtual galleries - what gives in getting all images to show up?

jfriendjfriend Registered Users Posts: 8,097 Major grins
edited May 16, 2011 in Bug Reporting
I created 33 virtual galleries (one for each person on a rowing team). I then uploaded (over the span of two days), 700 images across four master galleries that contain keywords that match the various 33 virtual galleries. The uploads finished about 7am Pacific time this morning. Here we are 4 hours later and my virtual galleries do not yet show all the images they should. If I go in individually to a virtual gallery, open the virtual gallery settings and rehit the Save button, all the images will show up. But, it isn't happening automatically.

I thought this was supposed to be fixed. Is 4 hours not enough time? How long do I have to wait? I'm hoping to go public with this set of galleries, but now I don't know when it's actually going to be ready. Do I have to resave the settings on 33 galleries to be sure they all have all their images?

Here's an example gallery: http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Satchi/16770297_VFv9pq#1264770527_M5q894r. There should be around 50 images, but it's only showing 12. I have NOT gone into this to re-save it.

This gallery shows 3 images and should show 37: http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Katie/16770293_g9pmSW#1264763948_Sxpq575.

This one shows 2 and should show 30: http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Renee/16770296_23nmTg#1264770527_M5q894r.

Here's one that was only showing 12 images (http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Costina/16770288_x7K8zm#1264816496_rtpS4xT) and I resaved the virtually gallery settings (without changing them) and now it shows 57 (the correct number).

When it this virtual gallery stuff ever going to just work? Can someone kick all my galleries to make them work? I don't want to manually resave the virtually gallery settings on 33 galleries to make sure they all work.
--John
HomepagePopular
JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
Always include a link to your site when posting a question

Comments

  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    Hi John,

    The issue I fixed was when the user uploaded keywords that have never been indexed. The bug you are reporting here is different, but one I saw on Sunday and I've been tracking it down. It is one of two things - either a slave is out-of-date when it goes to read the images that match a keyword, in some cases, or there is a foreach loop that is failing catastrophically as it loops through the images to add. This is another of those "really tough ones", but I'm pretty sure that is what you are being bitten by here.

    And, yes, it will work. I don't give up :)

    - Greg
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 26, 2011
    Twoofy wrote: »
    Hi John,

    The issue I fixed was when the user uploaded keywords that have never been indexed. The bug you are reporting here is different, but one I saw on Sunday and I've been tracking it down. It is one of two things - either a slave is out-of-date when it goes to read the images that match a keyword, in some cases, or there is a foreach loop that is failing catastrophically as it loops through the images to add. This is another of those "really tough ones", but I'm pretty sure that is what you are being bitten by here.

    - Greg
    My use case was to create the virtual galleries, then upload new images with keywords for those virtual galleries. That sounds like the exact case you said you thought you fixed.

    So, how do I get my virtual galleries fixed to show all the images they are supposed to?

    I guess I'm also wondering how I would use virtual galleries without running into this problem. I thought I had the most basic use case there was. Upload new images with matching keywords and expect them to show in a previously defined virtual gallery.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    jfriend wrote: »
    My use case was to create the virtual galleries, then upload new images with keywords for those virtual galleries. That sounds like the exact case you said you thought you fixed.

    So, how do I get my virtual galleries fixed to show all the images they are supposed to?

    I guess I'm also wondering how I would use virtual galleries without running into this problem. I thought I had the most basic use case there was. Upload new images with matching keywords and expect them to show in a previously defined virtual gallery.

    Its a bit different - the use case I fixed was when the keywords were ones that we have never indexed or seen before (in a global site-wide context). There is a separate bug (the one I am on now) where the table containing the images that match your rules gets updated too soon (I.E. reading from a slave) or like I said the foreach loop that inserts into the table fails. Then when you go to hit the gallery page it reads from this table and caches the result for faster rendering. Its more complex, but I'm just trying to explain the section of the process/code that is causing the problem.

    In the case of the bug I fixed, it would *always* fail if the keyword was one that the system had never seen. But it could still sometimes fail if/when it hits this new bug I'm on the trail of.

    I am going to ask our customer support to go through and clean up your galleries. You shouldn't have to mess with this. When I finish sorting out this bug I'll probably whip up some tool they can use to do this more cleanly, but thats obviously just a Band-Aid [tm]. This thing needs to work reliably and handle failures gracefully.

    If you have an example of a keyword that you think the system has never seen before that did not end up getting indexed correctly let me know, I can run a few queries and figure out very quickly if that is the case. Though I am very certain that particular bug is bothering us no more.

    - Greg
  • docwalkerdocwalker Registered Users Posts: 1,867 SmugMug Employee
    edited April 26, 2011
    I think I got them all refreshed for you John. Hopefully we can get this fixed soon.
    SmugMug Support Hero
    http://help.smugmug.com
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 26, 2011
    Twoofy wrote: »
    Its a bit different - the use case I fixed was when the keywords were ones that we have never indexed or seen before (in a global site-wide context). There is a separate bug (the one I am on now) where the table containing the images that match your rules gets updated too soon (I.E. reading from a slave) or like I said the foreach loop that inserts into the table fails. Then when you go to hit the gallery page it reads from this table and caches the result for faster rendering. Its more complex, but I'm just trying to explain the section of the process/code that is causing the problem.

    In the case of the bug I fixed, it would *always* fail if the keyword was one that the system had never seen. But it could still sometimes fail if/when it hits this new bug I'm on the trail of.

    I am going to ask our customer support to go through and clean up your galleries. You shouldn't have to mess with this. When I finish sorting out this bug I'll probably whip up some tool they can use to do this more cleanly, but thats obviously just a Band-Aid [tm]. This thing needs to work reliably and handle failures gracefully.

    If you have an example of a keyword that you think the system has never seen before that did not end up getting indexed correctly let me know, I can run a few queries and figure out very quickly if that is the case. Though I am very certain that particular bug is bothering us no more.

    - Greg
    Glad you're on the case Greg. This sounds like it was pretty under-designed when first built. Hope you can get to the bottom of it soon. I do think I saw a case of a brand new keyword where nothing got indexed. It was these images: http://friend.smugmug.com/keyword/dan#1266361583_cLP75bB which were all uploaded last night and the Dan virtual gallery was empty this morning. Incidentally, something else is going on now because this Dan virtual gallery won't open right now for me. The browser just spins forever, never opening it. I've tried a couple browsers, logged in and logged out. Other galleries will open, not that one.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 26, 2011
    docwalker wrote: »
    I think I got them all refreshed for you John. Hopefully we can get this fixed soon.
    Thanks Doc. I still found a few that needed to be refreshed as they were still short. Not sure whether you missed a few or the issue doesn't fully resolve itself?
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • roletterolette Registered Users Posts: 223 Major grins
    edited April 26, 2011
    jfriend wrote: »
    I created 33 virtual galleries (one for each person on a rowing team). I then uploaded (over the span of two days), 700 images across four master galleries that contain keywords that match the various 33 virtual galleries. The uploads finished about 7am Pacific time this morning. Here we are 4 hours later and my virtual galleries do not yet show all the images they should. If I go in individually to a virtual gallery, open the virtual gallery settings and rehit the Save button, all the images will show up. But, it isn't happening automatically.

    I thought this was supposed to be fixed. Is 4 hours not enough time? How long do I have to wait? I'm hoping to go public with this set of galleries, but now I don't know when it's actually going to be ready. Do I have to resave the settings on 33 galleries to be sure they all have all their images?

    Here's an example gallery: http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Satchi/16770297_VFv9pq#1264770527_M5q894r. There should be around 50 images, but it's only showing 12. I have NOT gone into this to re-save it.

    This gallery shows 3 images and should show 37: http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Katie/16770293_g9pmSW#1264763948_Sxpq575.

    This one shows 2 and should show 30: http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Renee/16770296_23nmTg#1264770527_M5q894r.

    Here's one that was only showing 12 images (http://friend.smugmug.com/Sports/Palo-Alto-Rowing-Club-2011/Costina/16770288_x7K8zm#1264816496_rtpS4xT) and I resaved the virtually gallery settings (without changing them) and now it shows 57 (the correct number).

    When it this virtual gallery stuff ever going to just work? Can someone kick all my galleries to make them work? I don't want to manually resave the virtually gallery settings on 33 galleries to make sure they all work.

    aka, the same problem we reported on virtual galleries over a year ago

    /sigh

    Jay
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    rolette wrote: »

    I know this is frustrating, but this feature is very complex and goes through many, many layers of the SM code base. There have been multiple issues going on here which is why it is really important to be precise about the bugs being reported here. Otherwise I am going to spend my time traveling down paths that have already been fixed. The post you are referring to points to some sort of indexing issue - as in the images that were being uploaded were not correctly being indexed. The issue we are dealing with right now is *much* more subtle and buried in caching, db replication, and code being called through obscure paths at the wrong times.

    In this case, the report from a year ago is very different from what Jfriend and I are focusing on at this point in time.

    Thank you for pointing this out to us, but in this case it is not the same thing.

    - Greg
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    jfriend wrote: »
    I created 33 virtual galleries (one for each person on a rowing team). I then uploaded (over the span of two days), 700 images across four master galleries that contain keywords that match the various 33 virtual galleries.

    Were these from EXIF data or did you add them manually?

    - Greg
  • roletterolette Registered Users Posts: 223 Major grins
    edited April 26, 2011
    Twoofy wrote: »
    I know this is frustrating, but this feature is very complex and goes through many, many layers of the SM code base. There have been multiple issues going on here which is why it is really important to be precise about the bugs being reported here. Otherwise I am going to spend my time traveling down paths that have already been fixed. The post you are referring to points to some sort of indexing issue - as in the images that were being uploaded were not correctly being indexed. The issue we are dealing with right now is *much* more subtle and buried in caching, db replication, and code being called through obscure paths at the wrong times.

    In this case, the report from a year ago is very different from what Jfriend and I are focusing on at this point in time.

    Thank you for pointing this out to us, but in this case it is not the same thing.

    - Greg

    I'll leave jfriend's thread alone, but the description so far matches. See posts #22 and #23 in the thread I linked. Doc reproduced it in #28.

    Jay
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    rolette wrote: »
    I'll leave jfriend's thread alone, but the description so far matches. See posts #22 and #23 in the thread I linked. Doc reproduced it in #28.

    Jay

    Yeah, same symptoms but different bug.

    - Greg
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    John or Jay,

    Are you going to be doing another batch of images like this in the near future? I have a potential fix live and would like to know if it works.

    - Greg
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 26, 2011
    Twoofy wrote: »
    John or Jay,

    Are you going to be doing another batch of images like this in the near future? I have a potential fix live and would like to know if it works.

    - Greg
    This event is all online now. My next similar event is a 3-day event May 6-8 with uploads 3-5 days afterwards.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • AndyAndy Registered Users Posts: 50,016 Major grins
    edited April 26, 2011
    jfriend wrote: »
    This event is up now. My next similar event is a 3-day event May 6-8 with uploads 3-5 days afterwards.

    You're shooting my birthday?????? Yay!
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited April 26, 2011
    Andy wrote: »
    You're shooting my birthday?????? Yay!
    That's some 3-day birthday! Actually I'll be shooting my 600 at a rowing regatta (regional championships) in Sacramento.
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 26, 2011
    I found another bug that would cause this same problem. I have a pending fix and will push it out tonight or tomorrow after I've had some time to think about it and test it.

    For those interested: the script that does all this processing has a max run time of 20 minutes. The script would then exit, leaving any pending albums that needed to be re-generated in a state where that would not happen. Because this script processes so many images in a 20 minute period of time the impact could be quite high.

    - Greg
  • roletterolette Registered Users Posts: 223 Major grins
    edited April 27, 2011
    Twoofy wrote: »
    John or Jay,

    Are you going to be doing another batch of images like this in the near future? I have a potential fix live and would like to know if it works.

    - Greg
    I've got a batch pending that I need to finish editing. I should be able to try it Saturday.
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 27, 2011
    rolette wrote: »
    I've got a batch pending that I need to finish editing. I should be able to try it Saturday.

    Awesome, I'm sure this latest fix I have will be out on Thursday (I may try to get it out today). Because of the number of issues that I've had to fix with the Smart Galleries I hesitate to do my usual declaration "this will work now". But, I am somewhere around 90% certain that everything will work perfectly for you on Saturday.

    This was a really tough one to sort out all the different things that were causing problems. My notepad with all the diagrams and reference notes brings to mind images of mad scientists and doomsday devices.

    - Greg
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited April 27, 2011
    All of the fixes for this are now live. This should work flawlessly for you guys now. Let me know if that is not the case....

    - Greg
  • roletterolette Registered Users Posts: 223 Major grins
    edited April 30, 2011
    Twoofy wrote: »
    All of the fixes for this are now live. This should work flawlessly for you guys now. Let me know if that is not the case....

    Just tested out the issue I was having and it is working. Good job! clap.gif

    Jay
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited May 1, 2011
    rolette wrote: »
    Just tested out the issue I was having and it is working. Good job! clap.gif

    Jay

    That is great, glad it is working for you. :)

    - Greg
  • TwoofyTwoofy Registered Users Posts: 171 Major grins
    edited May 16, 2011
    jfriend wrote: »
    This event is all online now. My next similar event is a 3-day event May 6-8 with uploads 3-5 days afterwards.

    Out of curiosity have you been able to upload these photos yet and if so, have you experienced any problems or is everything working as expected?

    - Greg
  • jfriendjfriend Registered Users Posts: 8,097 Major grins
    edited May 16, 2011
    Twoofy wrote: »
    Out of curiosity have you been able to upload these photos yet and if so, have you experienced any problems or is everything working as expected?

    - Greg
    I did upload nearly 1000 photos that spanned 50 virtual galleries. I saw no issues this time. I didn't exhaustively check everything, but the few spot checks I made showed the correct number of photos in each virtual gallery. Looks good to me (at least for my workflow/use of virtual galleries).
    --John
    HomepagePopular
    JFriend's javascript customizationsSecrets for getting fast answers on Dgrin
    Always include a link to your site when posting a question
Sign In or Register to comment.