Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-20965

[HotFix ]CLONE-0kb file when using REST API nodes/{nodeID}/content in a clustered ACS

    Details

      Description

      HF needs to include MNT-20965 & MNT-20714 please.

      Description

      In a clustered ACS setup, running multiple calls to REST API:

      PUT /alfresco/api/-default-/public/alfresco/versions/1/nodes/{{nodeId}}/content 

      where the call are sent to alternating cluster nodes, results in the node having 0kb size.

      The 0kb can be observed from the JSON response from the api call, using node browser cm:content: size, and when viewing associated .bin file on the content store file system. In addition, when the issue occurs, the HTTP response is still 200.

      Steps to reproduce

      Install OOTB 5.2.5 two node cluster. The two nodes will be called ACS-node1 and ACS-node2.

      1. Login to share as admin and create:
      • A test site
      • A test file of type text within the test site's document library
      1. Make a note of the node UUID for the test file as this will be used in subsequent steps. In the below step, the node UUID will be 1234
      2. Create a Postman collection to perform the following
      • Using ACS-node1
        • PUT /alfresco/api/default/public/alfresco/versions/1/nodes/1234/content
      • Using ACS-node2
        • PUT /alfresco/api/default/public/alfresco/versions/1/nodes/1234/content
      • Using ACS-node1
        • PUT /alfresco/api/default/public/alfresco/versions/1/nodes/1234/content
      • For each of the above Postman requests perform the following Postman configurations:
        • Add an authorization header for the admin user
        • Add a body of type raw, and add 11 lines of random text at least 168 character long (see attached file testRawText.txt for an example)
        • Add the following javaScript test to check the JSON response for sizeInBytes and assert it should not equal zero
      pm.test("PUT: ERROR File size is 0 bytes", function () {
      
          var jsonData = pm.response.json();
      
          console.log(jsonData);
      
          pm.expect(jsonData.entry.content.sizeInBytes).to.not.eql(0);
      
      });

       Using Postman Collection Runner run the collection with 1000ms or less delay.

      And example of the run can be found in the attached file run.png

      Observed Behaviour

      • The third REST API call returns a HTTP 200 response
      • The Postman assertation/ test will fail.
      • Looking at the node from:
      • JSON response returns sizeInBytes as 0
      • Node browser cm:content:size is 0bk
      • Associated content file in content store is 0kb

      Expected Behaviour

      The content should be updated corrected

      If this is not possible, the return code should not be HTTP 200

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs
                  Reporter:
                  sreehall Sandeep Reehall
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Structure Helper Panel