Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2216

Consider adding conventional status attribute key for warnings

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.4.2
    • 3.4.2
    • console, server
    • None

    Description

      Status attributes let server-side graph providers send arbitrary metadata alongside graph resultsets.  The client can either ignore attributes or check for them.

      A remote graph implementation might want to send warning information back to the client along with a resultset.  Maybe a traversal executed successfully, but it contained some kind of implementation-specific antipattern that justifies a warning.

      For instance, Tokens defines STATUS_ATTRIBUTE_EXCEPTIONS and STATUS_ATTRIBUTE_STACK_TRACE.  Perhaps we could add a new STATUS_ATTRIBUTE_WARNINGS alongside those two.  The console's DriverRemoteAcceptor could check for this key when processing each result set, printing the associated value (when an entry is present).

      I've already done this on the 3.4.x line.  I don't know whether this is something TinkerPop would want, or whether it should remain in vendor-specific extensions, or if there is some other approach that might fit better; but I'll open a PR with what I've been using.

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              dalaro Dan LaRocque
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: