Item Counters for Communities and Collections not working well

495 views
Skip to first unread message

Caty

unread,
Feb 17, 2024, 10:10:55 AM2/17/24
to DSpace Technical Support
Hi,

The setting:
webui.strengths.show = true
is not updating the item counter for collections and communitiesin DSpace 7.6/DSpace 7.6.1.
Not even dspace index-discovery -b is not updating the item counters.
Only tomcat restart in updating the counters.

Seetting webui.strengths.cache to false failes DSpace to load collections and communities

The same is on demo dspace:
The collection collection1_test  in this community
has 1 item , but displays counter 0:

It is not updated in real time, not even hours after adding the item.

In DSpace 6 it was working very well, the counter was updated within seconds after adding items.

So the behaviour of item counters is as described here:
*************************
mpasternak commented 2 weeks ago
That was the first thing I thought about. I ran dspace index-discovery -b, then re-loaded Solr core but it did not help. The numbers still don't add up.

@mpasternak
mpasternak commented 2 weeks ago
Also, enabling web.strengths.cache to false causes collections to freak out. What logs should I examine? Not much in dspace logs, not much in Catalina.out 
*******************

We really need this feature..
Could you give a solution, please?
Thank you very much,
Caty

Caty

unread,
Feb 26, 2024, 8:06:06 AM2/26/24
to DSpace Technical Support
Hi, Is anyone using item counters for Communities and Collections? Are they working well?

Thank you,
Caty

Andrew K

unread,
Feb 26, 2024, 8:56:24 AM2/26/24
to DSpace Technical Support
Hi Caty,

It depends on how you define "working well". I just don't expect immediate updates. Not sure how long it takes, but AFAIK the next day the numbers look good. That's well enough for me )

WBR,
Andrew

понеділок, 26 лютого 2024 р. о 15:06:06 UTC+2 Caty пише:

Caty

unread,
Feb 27, 2024, 4:17:48 AM2/27/24
to DSpace Technical Support

Hi Andrew,

Thank you for your answer.
My expectation was that item counters have the same behaviour as in version 6, that means immediate update of counters.

In tests I made on dome.dspace.org item counters did not updated immediately, the next day or not even the second day after creating new items, although they appeared immediately in Recent Submissions.

Same on my dspace 7 implementation, where I observed only tomcat restart updated them.

Kind regards,
Caty

emilio lorenzo

unread,
Feb 27, 2024, 6:20:08 AM2/27/24
to dspac...@googlegroups.com

Hi Caty

workinq well has many meanings   😂  ... 

 the main factors are  a)  the item-counter is no instantly updated as Andrew points out     b)    any item can have different access  policies.

The latter  means that the item-counter reflects the anonymous´user view of the repository,  (our experiences seems to indicate that, I have not checked the code)  , so expect large discrpancies if the number of restricted items, o even collections, is noticiable


Best

Emilio

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/d2c7447b-3f8b-41b7-9e26-e0bbe3cf10b0n%40googlegroups.com.

Caty

unread,
Feb 28, 2024, 8:05:45 AM2/28/24
to DSpace Technical Support
Hi Emilio,

I added yesterday an item in the collection https://demo.dspace.org/collections/2dc46bf8-772f-4c44-8abd-a4514c23da96 (Home/Comunidade de teste/Coleção de teste)

This collections has: READ Anonymous ,DEFAULT_ITEM_READ Anonymous, DEFAULT_BITSTREAM_READ Anonymous
and the parent community (Comunidade de teste): READ Anonymous

This collection has 2 items (one existent and one added by me), but it shows collection item counter 1:  "Coleção de teste (1)"

Best regards,
Caty

Andrew K

unread,
Feb 28, 2024, 2:36:55 PM2/28/24
to DSpace Technical Support
It shows eactly 2 items now...


середу, 28 лютого 2024 р. о 15:05:45 UTC+2 Caty пише:

Caty

unread,
Mar 9, 2024, 4:51:04 AM3/9/24
to DSpace Technical Support
Hi,

(READ/DEFAULT_ITEM_READ/DEFAULT_BITSTREAM_READ) with 2 items

is stiil 1 :  DDD  (1)  , although the second item has been submitted on the 5th of March, 4 days ago.



Best regards,
Caty

Amy Ball Wicklund

unread,
Mar 25, 2024, 6:21:00 PM3/25/24
to DSpace Technical Support
We are seeing the same problematic behavior in our production installation. Incorrect inaccurate item counts, even on publicly accessible collections & items, even days after the most recent submission.

Amy Ball Wicklund

unread,
Mar 25, 2024, 8:47:30 PM3/25/24
to DSpace Technical Support
Forgot to add that disabling the cache (setting `webui.strengths.cache=false`) results in "Error fetching collection" and "error.top-level-communities". No communities or collections will load.

From the console & error logs: java.lang.NullPointerException: Cannot invoke "org.dspace.core.DBConnection.getSession()" because the return value of "org.dspace.core.Context.getDBConnection()" is null
        at org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:59) ~[dspace-api-7.6.1.jar:7.6.1]
        at org.dspace.core.AbstractHibernateDAO.createQuery(AbstractHibernateDAO.java:137) ~[dspace-api-7.6.1.jar:7.6.1]
        at org.dspace.content.dao.impl.ItemDAOImpl.countItems(ItemDAOImpl.java:395) ~[dspace-api-7.6.1.jar:7.6.1]
        at org.dspace.content.ItemServiceImpl.countItems(ItemServiceImpl.java:1589) ~[dspace-api-7.6.1.jar:7.6.1]
        at org.dspace.browse.ItemCounter.getCount(ItemCounter.java:131) ~[dspace-api-7.6.1.jar:7.6.1]
        at org.dspace.content.CommunityServiceImpl.countArchivedItems(CommunityServiceImpl.java:723) ~[dspace-api-7.6.1.jar:7.6.1]
        at org.dspace.content.Community.countArchivedItems(Community.java:275) ~[dspace-api-7.6.1.jar:7.6.1]
... (etc) "

Ball Wicklund,Amy

unread,
Mar 25, 2024, 10:36:51 PM3/25/24
to DSpace Technical Support
Update: restarting Tomcat updates the item counts to the correct number.




Amy Ball Wicklund

Pronouns: She/Her (learn more)
Developer and Application Administrator
Library Technology Services
Colorado State University Libraries

970.491.8780



From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Amy Ball Wicklund <amy.ball...@colostate.edu>
Sent: Monday, March 25, 2024 5:47 PM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [dspace-tech] Re: Item Counters for Communities and Collections not working well
 

** Caution: EXTERNAL Sender **

--
All messages to this mailing list should adhere to the Code of Conduct: https://www.lyrasis.org/about/Pages/Code-of-Conduct.aspx
---
You received this message because you are subscribed to a topic in the Google Groups "DSpace Technical Support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/dspace-tech/hMxGxO9C4Us/unsubscribe.
To unsubscribe from this group and all its topics, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/cc854395-5142-41d4-800d-a20bec74df1cn%40googlegroups.com.

Ball Wicklund,Amy

unread,
Mar 25, 2024, 11:05:54 PM3/25/24
to DSpace Technical Support


Amy Ball Wicklund

Pronouns: She/Her (learn more)
Developer and Application Administrator
Library Technology Services
Colorado State University Libraries

970.491.8780



From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Ball Wicklund,Amy <Amy.Ball...@colostate.edu>
Sent: Monday, March 25, 2024 7:36 PM

Amy Ball Wicklund

unread,
Mar 26, 2024, 5:38:57 PM3/26/24
to DSpace Technical Support
Bug report also filed for the live counts breaking the community list: https://github.com/DSpace/DSpace/issues/9437
Reply all
Reply to author
Forward
0 new messages