)]}'
{"java/src/main/java/monasca/api/infrastructure/persistence/vertica/MeasurementVerticaRepoImpl.java":[{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"cf32710fa2fe76335f5b69031556685a910e7c6d","unresolved":false,"context_lines":[{"line_number":107,"context_line":"      Map\u003cByteBuffer, Measurements\u003e results \u003d new LinkedHashMap\u003c\u003e();"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"      Set\u003cbyte[]\u003e defDimIdSet \u003d new HashSet\u003c\u003e();"},{"line_number":110,"context_line":"      Set\u003cbyte[]\u003e dimSetIdSet \u003d new HashSet\u003c\u003e();"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"      String namePart \u003d \"\";"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_c945e543","line":110,"range":{"start_line":110,"start_character":18,"end_line":110,"end_character":29},"updated":"2016-04-26 15:59:59.000000000","message":"This variable is not used anywhere else","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"97bbe8d4c443c34282b83924b7a8dedbfd9007a8","unresolved":false,"context_lines":[{"line_number":107,"context_line":"      Map\u003cByteBuffer, Measurements\u003e results \u003d new LinkedHashMap\u003c\u003e();"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"      Set\u003cbyte[]\u003e defDimIdSet \u003d new HashSet\u003c\u003e();"},{"line_number":110,"context_line":"      Set\u003cbyte[]\u003e dimSetIdSet \u003d new HashSet\u003c\u003e();"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"      String namePart \u003d \"\";"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_a8f5e8ed","line":110,"range":{"start_line":110,"start_character":18,"end_line":110,"end_character":29},"in_reply_to":"1a122d0e_c945e543","updated":"2016-04-27 15:40:51.000000000","message":"Done","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"cf32710fa2fe76335f5b69031556685a910e7c6d","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"      List\u003cMap\u003cString, Object\u003e\u003e rows \u003d query.list();"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"      ByteBuffer defId \u003d ByteBuffer.wrap(new byte[0]);"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"      for (Map\u003cString, Object\u003e row : rows) {"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_89664deb","line":134,"range":{"start_line":134,"start_character":17,"end_line":134,"end_character":22},"updated":"2016-04-26 15:59:59.000000000","message":"This is really a constant. Let\u0027s make it one explicitly to make it easier to see what is happening below","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"97bbe8d4c443c34282b83924b7a8dedbfd9007a8","unresolved":false,"context_lines":[{"line_number":131,"context_line":""},{"line_number":132,"context_line":"      List\u003cMap\u003cString, Object\u003e\u003e rows \u003d query.list();"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"      ByteBuffer defId \u003d ByteBuffer.wrap(new byte[0]);"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"      for (Map\u003cString, Object\u003e row : rows) {"},{"line_number":137,"context_line":""}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_e8db607a","line":134,"range":{"start_line":134,"start_character":17,"end_line":134,"end_character":22},"in_reply_to":"1a122d0e_89664deb","updated":"2016-04-27 15:40:51.000000000","message":"Done","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"}],"java/src/main/java/monasca/api/infrastructure/persistence/vertica/MetricDefinitionVerticaRepoImpl.java":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"9b7e73652738398269975cf10a8be0661a5bc9e4","unresolved":false,"context_lines":[{"line_number":66,"context_line":"      + \"%s \" // Offset goes here"},{"line_number":67,"context_line":"      + \"%s \" // Dimensions and clause goes here"},{"line_number":68,"context_line":"      + \"%s \" // Time qualifier goes here"},{"line_number":69,"context_line":"      + \"GROUP BY defDimsSub.id HAVING COUNT(*) \u003d 2 \""},{"line_number":70,"context_line":"      + \"ORDER BY defDimsSub.id ASC \""},{"line_number":71,"context_line":"      + \"%s \"; // limit goes here"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-java","patch_set":2,"id":"1a122d0e_63e900b7","line":69,"range":{"start_line":69,"start_character":50,"end_line":69,"end_character":51},"updated":"2016-04-20 16:05:48.000000000","message":"This shouldn\u0027t be a constant, fixing","commit_id":"fe77ad1469850e8a2e67e1f1d6ea85e40b604c8d"}],"java/src/main/java/monasca/api/infrastructure/persistence/vertica/MetricQueries.java":[{"author":{"_account_id":8126,"name":"Bradley Klein","email":"bradley.klein@charter.com","username":"bklei"},"change_message_id":"3f56b7a5a42809128095df33c87e9402f2bb1b2a","unresolved":false,"context_lines":[{"line_number":78,"context_line":"      // Limit is non-deterministic here unless we also"},{"line_number":79,"context_line":"      // order by."},{"line_number":80,"context_line":"      //"},{"line_number":81,"context_line":"      if (limit \u003e 0) {"},{"line_number":82,"context_line":"        sb.append(\"order by dimension_set_id \")"},{"line_number":83,"context_line":"          .append(\"limit \" + Integer.toString(limit + 1));"},{"line_number":84,"context_line":"      }"}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_0bf2d699","side":"PARENT","line":81,"updated":"2016-04-20 20:44:36.000000000","message":"I\u0027m concerned that this query has no limit.  In my testing the API is behaving correctly as far as i can tell with limit, both max and specified from the CLI.  But I\u0027d feel safer if this query also had a limit.  In our environment, I\u0027m pretty sure this initial query could lock the API up if unbounded.","commit_id":"5697d16f4237a8ef65de6917aedd056388848b10"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"0c4cfb2c2078fdfc65524723fa1321ec74faed0b","unresolved":false,"context_lines":[{"line_number":78,"context_line":"      // Limit is non-deterministic here unless we also"},{"line_number":79,"context_line":"      // order by."},{"line_number":80,"context_line":"      //"},{"line_number":81,"context_line":"      if (limit \u003e 0) {"},{"line_number":82,"context_line":"        sb.append(\"order by dimension_set_id \")"},{"line_number":83,"context_line":"          .append(\"limit \" + Integer.toString(limit + 1));"},{"line_number":84,"context_line":"      }"}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_12f1666b","side":"PARENT","line":81,"in_reply_to":"1a122d0e_0bf2d699","updated":"2016-04-20 21:35:17.000000000","message":"We have to limit only after we\u0027ve applied all the filters, otherwise the filters do not work properly. Also, note that the dimension and clause is not a part of other queries which do include a limit","commit_id":"5697d16f4237a8ef65de6917aedd056388848b10"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"cf32710fa2fe76335f5b69031556685a910e7c6d","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    StringBuilder sb \u003d null;"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    if (dimensions !\u003d null \u0026\u0026 dimensions.size() \u003e 0) {"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"      sb \u003d new StringBuilder();"},{"line_number":47,"context_line":"      sb.append(\" and ( \");"}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_69f011fe","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":54},"updated":"2016-04-26 15:59:59.000000000","message":"Rewrite this as:\n\nif (dimensions \u003d\u003d null || dimensions.isEmpty()) {\n  return \"\";\n}\n\nThat will make the code simpler","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"97bbe8d4c443c34282b83924b7a8dedbfd9007a8","unresolved":false,"context_lines":[{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    StringBuilder sb \u003d null;"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    if (dimensions !\u003d null \u0026\u0026 dimensions.size() \u003e 0) {"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"      sb \u003d new StringBuilder();"},{"line_number":47,"context_line":"      sb.append(\" and ( \");"}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_2d2a8a90","line":44,"range":{"start_line":44,"start_character":4,"end_line":44,"end_character":54},"in_reply_to":"1a122d0e_69f011fe","updated":"2016-04-27 15:40:51.000000000","message":"Done","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"},{"author":{"_account_id":11809,"name":"Craig Bryant","email":"craig.bryant@hpe.com","username":"craig-bryant"},"change_message_id":"cf32710fa2fe76335f5b69031556685a910e7c6d","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  }"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"  static String buildDimensionsSizeClause(Map\u003cString, String\u003e dimensions) {"},{"line_number":90,"context_line":"    if (dimensions \u003d\u003d null || dimensions.size() \u003d\u003d 0) {"},{"line_number":91,"context_line":"      return \"\";"},{"line_number":92,"context_line":"    } else {"},{"line_number":93,"context_line":"      return \"HAVING COUNT(*) \u003d \" + dimensions.size();"}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_2938d99f","line":90,"range":{"start_line":90,"start_character":30,"end_line":90,"end_character":52},"updated":"2016-04-26 15:59:59.000000000","message":"dimensions.isEmpty()","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"},{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"97bbe8d4c443c34282b83924b7a8dedbfd9007a8","unresolved":false,"context_lines":[{"line_number":87,"context_line":"  }"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"  static String buildDimensionsSizeClause(Map\u003cString, String\u003e dimensions) {"},{"line_number":90,"context_line":"    if (dimensions \u003d\u003d null || dimensions.size() \u003d\u003d 0) {"},{"line_number":91,"context_line":"      return \"\";"},{"line_number":92,"context_line":"    } else {"},{"line_number":93,"context_line":"      return \"HAVING COUNT(*) \u003d \" + dimensions.size();"}],"source_content_type":"text/x-java","patch_set":3,"id":"1a122d0e_4d2d46a7","line":90,"range":{"start_line":90,"start_character":30,"end_line":90,"end_character":52},"in_reply_to":"1a122d0e_2938d99f","updated":"2016-04-27 15:40:51.000000000","message":"Done","commit_id":"c0f76ac5af34c1000ee1e8dde8a97b2a0fe36121"}]}
