Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-21576

Multiple Ratings per EntityReference and UserReference in Solr

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Hi,

      this is the result from a call to getCurrentUserRatings:

       

      [identifier = [1aaaceaf-e38b-4928-b4c7-b161d61bbc18], managerId = [aufgaben], reference = [Document Sandbox_test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Sat Nov 11 16:04:45 CET 2023], updatedAt = [Sat Nov 11 16:06:15 CET 2023], vote = [2], scale = [5], identifier = [5d9cc4d9-72ce-4996-8c77-01feb0e2ab67], managerId = [aufgaben], reference = [Document Sandbox^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Sat Nov 11 16:07:06 CET 2023], updatedAt = [Mon Nov 13 08:37:26 CET 2023], vote = [2], scale = [5], identifier = [6d64beaa-bf92-4b99-a85f-6688c1ef5da3], managerId = [aufgaben], reference = [Object xwiki:Macros.Aufgabenbewertung.Sandbox^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Sun Nov 12 13:28:44 CET 2023], updatedAt = [Wed Nov 15 11:02:22 CET 2023], vote = [5], scale = [5], identifier = [6119c18f-0b84-40a4-985e-985bc690548d], managerId = [aufgaben], reference = [Object xwiki:Macros.Aufgabenbewertung.SandboxWebHome^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Wed Nov 15 11:03:07 CET 2023], updatedAt = [Wed Nov 15 11:03:07 CET 2023], vote = [1], scale = [5], identifier = [bca29d13-3c27-4239-a298-9141a9df01a9], managerId = [aufgaben], reference = [Object xwiki:Macros.Aufgabenbewertung.SandboxWebHome^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Wed Nov 15 11:03:07 CET 2023], updatedAt = [Wed Nov 15 11:03:32 CET 2023], vote = [5], scale = [5], identifier = [783a56e5-e4fe-4b02-bb38-8ecf5b055977], managerId = [aufgaben], reference = [Object xwiki:Sandbox.WebHome^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Wed Nov 15 11:03:57 CET 2023], updatedAt = [Wed Nov 15 11:03:57 CET 2023], vote = [4], scale = [5], identifier = [3312ed15-b535-46d8-a66a-ff8a5a8b71cc], managerId = [aufgaben], reference = [Object xwiki:Sandbox.WebHome.WebHome^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Wed Nov 15 11:06:23 CET 2023], updatedAt = [Wed Nov 15 11:06:23 CET 2023], vote = [4], scale = [5], identifier = [2fe7d8e8-af54-4fac-8cbd-d7d6e5babeb2], managerId = [aufgaben], reference = [Object xwiki:Sandbox.WebHome.WebHome^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Wed Nov 15 11:06:23 CET 2023], updatedAt = [Wed Nov 15 11:59:04 CET 2023], vote = [4], scale = [5], identifier = [5053746a-913a-4bf3-a810-0139fc5e828d], managerId = [aufgaben], reference = [Object xwiki:Sandbox.WebHome^test], user = [reference = [xwiki:XWiki.holgerengels]], createdAt = [Wed Nov 15 11:03:57 CET 2023], updatedAt = [Thu Nov 16 20:35:11 CET 2023], vote = [3], scale = [5]] 

      I've marked two equal ref-combies red.

       

      I think, I have an idea, how this happened. Due to some inacurracy in my client code, I sent two fetch-calls successively. This resulted in two invocations of the ratings api from two threads in parallel :-/

      I guess, a simple synchronized modificator could avoid this!?

      Attachments

        Activity

          People

            surli Simon Urli
            hengels Holger Engels
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: