-
Type:
Hot Fix Request
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 5.2.5
-
Component/s: ACS REST API, Clustering
-
Labels:
-
Bug Priority:
-
Hot Fix Version:5.2.6.1
-
ACT Numbers:
00990832
-
Premier Customer:Yes
-
Sprint:Repo 66 - ACS 6.2 PRR
-
Story Points:5
-
Prioritization Score:4.7
-
Epic Link:
-
Delivery Team:Feature Teams
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.
- Login to share as admin and create:
- A test site
- A test file of type text within the test site's document library
- 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
- Create a Postman collection to perform the following
- Using ACS-node1
- PUT /alfresco/api/
default/public/alfresco/versions/1/nodes/1234/content
- PUT /alfresco/api/
- Using ACS-node2
- PUT /alfresco/api/
default/public/alfresco/versions/1/nodes/1234/content
- PUT /alfresco/api/
- Using ACS-node1
- PUT /alfresco/api/
default/public/alfresco/versions/1/nodes/1234/content
- PUT /alfresco/api/
- 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