Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-31378

Remove potential contention in flag property check

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.10-HF68, 2023.0, 2021.29
    • Component/s: Core

      Description

      In some specific type of load some check on property flag may be highly stressed:

      For instance to check if a property (could be on each item of a long list of property) SchemaManagedImpl#isSecured is called:

              at java.util.regex.Matcher.replaceAll(Matcher.java:951)
              at java.lang.String.replaceAll(String.java:2223)
              at org.nuxeo.ecm.core.schema.SchemaManagerImpl.cleanPath(SchemaManagerImpl.java:1010)
              at org.nuxeo.ecm.core.schema.SchemaManagerImpl.isSecured(SchemaManagerImpl.java:994)
              at org.nuxeo.ecm.core.api.model.impl.PropertyFactory.computePropertyFlags(PropertyFactory.java:122)
              at org.nuxeo.ecm.core.api.model.impl.PropertyFactory.createProperty(PropertyFactory.java:64)
              at org.nuxeo.ecm.core.api.model.impl.DocumentPartImpl.createProperty(DocumentPartImpl.java:123)
              at org.nuxeo.ecm.core.api.model.impl.ListProperty.init(ListProperty.java:230)
              at org.nuxeo.ecm.core.api.model.impl.ComplexProperty.init(ComplexProperty.java:203)
              at org.nuxeo.ecm.core.api.impl.DataModelImpl.<init>(DataModelImpl.java:73)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.clone(DocumentModelImpl.java:1368)
      

      Also, on the PropertyFactroy.computePropertyFlags:

              at java.util.stream.StreamOpFlag.fromCharacteristics(StreamOpFlag.java:733)
              at java.util.stream.StreamSupport.intStream(StreamSupport.java:139)
              at java.util.Arrays.stream(Arrays.java:5053)
              at java.util.Arrays.stream(Arrays.java:5035)
              at java.util.stream.IntStream.of(IntStream.java:722)
              at org.nuxeo.ecm.core.api.model.impl.PropertyFactory.computePropertyFlags(PropertyFactory.java:108)
              at org.nuxeo.ecm.core.api.model.impl.PropertyFactory.createProperty(PropertyFactory.java:64)
              at org.nuxeo.ecm.core.api.model.impl.DocumentPartImpl.createProperty(DocumentPartImpl.java:123)
              at org.nuxeo.ecm.core.api.model.impl.ListProperty.init(ListProperty.java:230)
              at org.nuxeo.ecm.core.api.model.impl.ComplexProperty.init(ComplexProperty.java:203)
              at org.nuxeo.ecm.core.api.impl.DataModelImpl.<init>(DataModelImpl.java:73)
              at org.nuxeo.ecm.core.api.impl.DocumentModelImpl.clone(DocumentModelImpl.java:1368)
      

        Attachments

        1. nuxeo-core-api-10.10-HF61-NXP-31378-NXP-31372.diff
          170 kB
          Benoit Delbosc
        2. nuxeo-core-api-10.10-HF62-NXP-31378-NXP-31372.diff
          11 kB
          Benoit Delbosc
        3. nuxeo-core-api-10.10-HF66-NXP-31378-NXP-31372.diff
          11 kB
          Benoit Delbosc

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: