{"action":"created","issue":{"url":"https://api.github.com/repos/pyr/cyanite/issues/246","repository_url":"https://api.github.com/repos/pyr/cyanite","labels_url":"https://api.github.com/repos/pyr/cyanite/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/pyr/cyanite/issues/246/comments","events_url":"https://api.github.com/repos/pyr/cyanite/issues/246/events","html_url":"https://github.com/pyr/cyanite/issues/246","id":178975929,"number":246,"title":"segment search regex leads to timeouts due to large return","user":{"login":"tehlers320","id":16598119,"avatar_url":"https://avatars.githubusercontent.com/u/16598119?v=3","gravatar_id":"","url":"https://api.github.com/users/tehlers320","html_url":"https://github.com/tehlers320","followers_url":"https://api.github.com/users/tehlers320/followers","following_url":"https://api.github.com/users/tehlers320/following{/other_user}","gists_url":"https://api.github.com/users/tehlers320/gists{/gist_id}","starred_url":"https://api.github.com/users/tehlers320/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tehlers320/subscriptions","organizations_url":"https://api.github.com/users/tehlers320/orgs","repos_url":"https://api.github.com/users/tehlers320/repos","events_url":"https://api.github.com/users/tehlers320/events{/privacy}","received_events_url":"https://api.github.com/users/tehlers320/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-23T21:20:09Z","updated_at":"2016-10-07T18:15:57Z","closed_at":null,"body":"To reproduce\r\nGrafana or graphite-api search:\r\n`prod.us-west-2.collectd_metrics.*.*.disk-*.disk_ops.write`\r\n\r\nCyanite will query this:\r\n`SELECT * from segment WHERE pos = 8 AND segment LIKE 'prod.us-west-2.collectd_metrics.%'  ALLOW FILTERING;`\r\n\r\nThis data contains many metrics that we do not need for this query for example:\r\n\r\n`prod.us-west-2.collectd_metrics.caps-competition-api-web.9b95f0-ip-10-1-1-247.interface-eth0.if_octets `\r\n\r\n```\r\ncqlsh -k metric -e \"SELECT * from segment WHERE pos = 8 AND segment LIKE 'prod.us-west-2.collectd_metrics.%'  ALLOW FILTERING;\"\r\n\r\n<stdin>:1:errors={'127.0.0.1': 'Client request timeout. See Session.execute[_async](timeout)'}, last_host=127.0.0.1\r\n```\r\n\r\nI tried to query for this but it doesn't seem supported in cassandra.\r\n`SELECT * from segment WHERE pos = 8 AND segment LIKE 'prod.us-west-2.collectd_metrics.%.disk_ops.write'  ALLOW FILTERING;`\r\n\r\nShould cyanite consider using tags and i wonder how much this would grow the segment table size by ? \r\n\r\ntags { \"prod\", \"us-west-2\", \"collectd_metrics\", \"cyanite-cassandra\", \"ip-10-1-1-23\", \"disk-xvdf\", \"disk_ops\", \"write\" }\r\n\r\nThen the query could do this based on any '.' entry that is not a regex\r\n\r\n_i did not test this..._\r\n`SELECT * FROM segment WHERE tags CONTAINS 'prod' AND tags CONTAINS 'us-west-2' AND tags 'collectd_metrics' AND tags CONTAINS 'disk_ops' AND tags CONTAINS 'write';\r\n`\r\n"},"comment":{"url":"https://api.github.com/repos/pyr/cyanite/issues/comments/252323508","html_url":"https://github.com/pyr/cyanite/issues/246#issuecomment-252323508","issue_url":"https://api.github.com/repos/pyr/cyanite/issues/246","id":252323508,"user":{"login":"jacobrichard","id":1444401,"avatar_url":"https://avatars.githubusercontent.com/u/1444401?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobrichard","html_url":"https://github.com/jacobrichard","followers_url":"https://api.github.com/users/jacobrichard/followers","following_url":"https://api.github.com/users/jacobrichard/following{/other_user}","gists_url":"https://api.github.com/users/jacobrichard/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobrichard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobrichard/subscriptions","organizations_url":"https://api.github.com/users/jacobrichard/orgs","repos_url":"https://api.github.com/users/jacobrichard/repos","events_url":"https://api.github.com/users/jacobrichard/events{/privacy}","received_events_url":"https://api.github.com/users/jacobrichard/received_events","type":"User","site_admin":false},"created_at":"2016-10-07T18:15:57Z","updated_at":"2016-10-07T18:15:57Z","body":"I pulled in the #248 fix and pushed it into our environment. As @tehlers320 reported, the tree is snappy but now I'm seeing a different error when retrieving metrics.\r\n\r\n`\r\nERROR [2016-10-07 18:12:30,789] epollEventLoopGroup-3-1 - io.cyanite.api could not process request\r\njava.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.core$partial$fn__4759\r\n\tat clojure.lang.RT.seqFrom(RT.java:542) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.lang.RT.seq(RT.java:523) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.core$seq__4357.invokeStatic(core.clj:137) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.core$map$fn__4785.invoke(core.clj:2637) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.lang.LazySeq.sval(LazySeq.java:40) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.lang.LazySeq.seq(LazySeq.java:49) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.lang.RT.seq(RT.java:521) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.core$seq__4357.invokeStatic(core.clj:137) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.core$apply.invokeStatic(core.clj:641) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.core$mapcat.invokeStatic(core.clj:2674) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.api$maybe_multiplex.invokeStatic(api.clj:109) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.api$fn__7657.invokeStatic(api.clj:151) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.api$fn__7657.invoke(api.clj:145) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat clojure.lang.MultiFn.invoke(MultiFn.java:229) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.api$process.invokeStatic(api.clj:89) ~[cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.api$make_handler$fn__7666.invoke(api.clj:167) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.http$request_handler$fn__1910.invoke(http.clj:110) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.http$netty_handler$fn__1918.invoke(http.clj:125) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.cyanite.http.proxy$io.netty.channel.ChannelInboundHandlerAdapter$ff19274a.channelRead(Unknown Source) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:103) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:428) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:276) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:263) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:243) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:307) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:293) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:840) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:830) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:348) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:264) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112) [cyanite-0.5.1-standalone.jar:na]\r\n\tat io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:137) [cyanite-0.5.1-standalone.jar:na]\r\n`"}}
{"actor":{"display_login":"jacobrichard"}}