Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1252

Improve SharedSchemaContextFactory

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • High
    • Resolution: Done
    • None
    • 7.0.0
    • parser

    Description

      SharedSchemaContextFactory is widely used for caching context. Unfortunately it has a major deficiency around first computation: if multiple requests enter resolution process, we end up computing the schema context concurrent and only deduplicate it afterwards.

      Refactor the implementation to remember futures, so concurrent accesses end up waiting for the initial computation to finish. This requires some fancy dance around references, as the indirection in cache values will mean that soft references will clean up on Future not being referenced, rather than the context not being referenced.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              rovarga Robert Varga
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: