#metabrainz

/

      • v6lur has quit
      • 2020-05-08 12943, 2020

      • Lotheric has quit
      • 2020-05-08 12907, 2020

      • Lotheric joined the channel
      • 2020-05-08 12942, 2020

      • supersandro20006 joined the channel
      • 2020-05-08 12937, 2020

      • supersandro2000 has quit
      • 2020-05-08 12925, 2020

      • d4rkie has quit
      • 2020-05-08 12908, 2020

      • Nyanko-sensei joined the channel
      • 2020-05-08 12910, 2020

      • supersandro20006 has quit
      • 2020-05-08 12942, 2020

      • supersandro2000 joined the channel
      • 2020-05-08 12929, 2020

      • Chinmay3199 has quit
      • 2020-05-08 12932, 2020

      • niceplace has quit
      • 2020-05-08 12940, 2020

      • niceplaces joined the channel
      • 2020-05-08 12941, 2020

      • djwhitey joined the channel
      • 2020-05-08 12954, 2020

      • thomasross has quit
      • 2020-05-08 12910, 2020

      • ishaanshah[m]
        ruaok: Hi, all my listens haven't been imported, is the process still going on?
      • 2020-05-08 12916, 2020

      • ishaanshah[m]
      • 2020-05-08 12958, 2020

      • ishaanshah[m]
      • 2020-05-08 12916, 2020

      • shivam-kapila
        ishaanshah[m]: The dump used ud old IG. The latest dump is yet under formation
      • 2020-05-08 12902, 2020

      • ishaanshah[m]
        Oh, makes sense, then it's fine
      • 2020-05-08 12910, 2020

      • shivam-kapila
        ruaok: I will go through test.lb.org. I also had a look the doc. It looks good to me. I will give a detailed look today too.
      • 2020-05-08 12922, 2020

      • ishaanshah[m]
        Yes, it shows 269 on my main account too
      • 2020-05-08 12940, 2020

      • shivam-kapila
        Its same in my case too
      • 2020-05-08 12915, 2020

      • ZaphodBeeblebrox joined the channel
      • 2020-05-08 12936, 2020

      • CatQuest has quit
      • 2020-05-08 12948, 2020

      • dseomn has quit
      • 2020-05-08 12951, 2020

      • shivam-kapila
        ishaanshah[m]: That because the Redis used by test.lb.org is same as that of prod. So listen count was reset. The listens are more in lb.org though.
      • 2020-05-08 12931, 2020

      • yokel has quit
      • 2020-05-08 12907, 2020

      • yokel joined the channel
      • 2020-05-08 12929, 2020

      • Nyanko-sensei has quit
      • 2020-05-08 12941, 2020

      • Nyanko-sensei joined the channel
      • 2020-05-08 12949, 2020

      • Sophist_UK has quit
      • 2020-05-08 12929, 2020

      • v6lur joined the channel
      • 2020-05-08 12943, 2020

      • ruaok
        mooin!
      • 2020-05-08 12902, 2020

      • ruaok
        ishaanshah[m]: it should have listens to Feb and then listens from yesterday. I'm waiting for a new dump
      • 2020-05-08 12902, 2020

      • Gazooo has quit
      • 2020-05-08 12917, 2020

      • shivam-kapila
        Morning!
      • 2020-05-08 12943, 2020

      • Gazooo joined the channel
      • 2020-05-08 12901, 2020

      • diru1100
        Mo''ing!!!
      • 2020-05-08 12916, 2020

      • shivam-kapila
        ruaok: The "My listens" page is quite slow to load in test.lb.org in comparision to lb.org. Is it something related to timescale fetch?
      • 2020-05-08 12905, 2020

      • ruaok
        I noticed that, but haven't had a chance to look. I wonder if we need another index or so.
      • 2020-05-08 12904, 2020

      • shivam-kapila
        Maybe.
      • 2020-05-08 12950, 2020

      • Zastai joined the channel
      • 2020-05-08 12959, 2020

      • Sophist-UK joined the channel
      • 2020-05-08 12943, 2020

      • ruaok
        I see some errors in the timescale log that very likely influence this. let me dig.
      • 2020-05-08 12939, 2020

      • shivam-kapila
        We noticed the slow pipeline too. Something is needed to speed these up.
      • 2020-05-08 12940, 2020

      • Chinmay3199 joined the channel
      • 2020-05-08 12957, 2020

      • ruaok
        it looks like a misconfiguration.
      • 2020-05-08 12944, 2020

      • ruaok
      • 2020-05-08 12946, 2020

      • ruaok
        the messybrainz instance is causing problems and it looks like backends are continually restarting or something like that.
      • 2020-05-08 12933, 2020

      • jmp_music joined the channel
      • 2020-05-08 12912, 2020

      • jmp_music
        mornings!
      • 2020-05-08 12932, 2020

      • ruaok
        morning!
      • 2020-05-08 12952, 2020

      • supersandro20005 joined the channel
      • 2020-05-08 12900, 2020

      • supersandro2000 has quit
      • 2020-05-08 12927, 2020

      • BrainzGit
        [listenbrainz-server] vansika opened pull request #839 (master…auth-token-hide): Don’t show user token on profile page by default https://github.com/metabrainz/listenbrainz-server…
      • 2020-05-08 12931, 2020

      • v6lur has quit
      • 2020-05-08 12933, 2020

      • BrainzGit
        [musicbrainz-docker] yvanzo opened pull request #147 (mbvm-38-dev…mapbox-token): Add support for displaying a map of area's places https://github.com/metabrainz/musicbrainz-docker/…
      • 2020-05-08 12916, 2020

      • yvanzo
        supersandro2000/supersandro20005: you’re welcome, it also allows me to ping you for review :)
      • 2020-05-08 12955, 2020

      • shivam-kapila
        ruaok: What problem is MsB causing?
      • 2020-05-08 12955, 2020

      • ruaok
        on function was not being found, which was a problem with running MsB on a recent version of PG. that is fixed, but there is still one other strange thing I need to look at. `LOG: incomplete startup packet` appears in the PG logs
      • 2020-05-08 12912, 2020

      • ruaok
        zas: ping
      • 2020-05-08 12920, 2020

      • zas
        pooong
      • 2020-05-08 12950, 2020

      • ruaok
        I'm trying to debug a strange problem with the timescale (postgres) setup.
      • 2020-05-08 12910, 2020

      • ruaok
        how often does a service check try to check to see if the service is alive?
      • 2020-05-08 12924, 2020

      • ruaok
        every 15 seconds?
      • 2020-05-08 12945, 2020

      • ruaok
        --env SERVICE_5432_CHECK_INTERVAL="15s" \
      • 2020-05-08 12950, 2020

      • ruaok
        heh, look, I'm smart.
      • 2020-05-08 12955, 2020

      • zas
        :)
      • 2020-05-08 12904, 2020

      • ruaok
        for some very small value of smart.
      • 2020-05-08 12952, 2020

      • ruaok
      • 2020-05-08 12914, 2020

      • ruaok
        oh, I think I understand now.
      • 2020-05-08 12923, 2020

      • ruaok
      • 2020-05-08 12958, 2020

      • ruaok
      • 2020-05-08 12930, 2020

      • ruaok
        I think the service check connects to PG, but it doesn't log in, so the LOG message is written.
      • 2020-05-08 12955, 2020

      • ruaok
        which means I can ignore it. too bad for the noisy log.
      • 2020-05-08 12942, 2020

      • ruaok
        shivam-kapila: ok, so a quick lesson on what I was doing.
      • 2020-05-08 12903, 2020

      • zas
        ruaok: may be you need a specific health check as the one we use for postgresql
      • 2020-05-08 12921, 2020

      • ruaok
        we noticed a problem (page loading slow). the first thing to do is to look at the logs and see what shows up there.
      • 2020-05-08 12935, 2020

      • ruaok
        if you do not recognize something, you need to find out what it is and solve it.
      • 2020-05-08 12945, 2020

      • ruaok
        in this case I found two unrelated problems and am working to solve them.
      • 2020-05-08 12954, 2020

      • ruaok
        only then can you look further. which is what I'll do next.
      • 2020-05-08 12920, 2020

      • ruaok
        zas: yes, I understand the need for that now. I'll put that in place after I find this other problem.
      • 2020-05-08 12955, 2020

      • zas
        k
      • 2020-05-08 12941, 2020

      • zas
        ask bitmap, since he's the one who implemented the pg health check, and afaik timescale is based on pg, so it might be very similar
      • 2020-05-08 12900, 2020

      • ruaok
        looking now. thanks.
      • 2020-05-08 12924, 2020

      • Nyanko-sensei has quit
      • 2020-05-08 12949, 2020

      • ruaok
        woo! log quiet. thanks zas.
      • 2020-05-08 12931, 2020

      • ruaok
        ok, shivam-kapila, now I can really start looking for the problem. heh.
      • 2020-05-08 12927, 2020

      • Nyanko-sensei joined the channel
      • 2020-05-08 12937, 2020

      • shivam-kapila
        > ok, so a quick lesson on what I was doing.
      • 2020-05-08 12937, 2020

      • shivam-kapila
        I agree to that totally. Thanks for the tips. Look for the reason for noise (logs) rather than making noise :)
      • 2020-05-08 12923, 2020

      • shivam-kapila
        > now I can really start looking for the problem. heh.
      • 2020-05-08 12923, 2020

      • shivam-kapila
        woo. I am also digging into the code to see if I can capture something.
      • 2020-05-08 12902, 2020

      • ruaok
        next stop. postgres EXPLAIN.
      • 2020-05-08 12956, 2020

      • shivam-kapila
        Its some magic. wow
      • 2020-05-08 12941, 2020

      • ruaok
        you should read the man page for postgres' EXPLAIN command.
      • 2020-05-08 12957, 2020

      • ruaok
        but I took the query that fetches listens on the listen page and run explain on it:
      • 2020-05-08 12957, 2020

      • ruaok
      • 2020-05-08 12905, 2020

      • ruaok
        the results appear instantly.
      • 2020-05-08 12915, 2020

      • shivam-kapila
        The cost is only 0.15 sec
      • 2020-05-08 12946, 2020

      • ruaok
        now, flip the < to > and repeat the EXPLAIN
      • 2020-05-08 12934, 2020

      • shivam-kapila
        Didnt notice much of a difference
      • 2020-05-08 12939, 2020

      • shivam-kapila
        0.15 sec
      • 2020-05-08 12915, 2020

      • ruaok
        run this `explain SELECT listened_at, recording_msid, data FROM listen WHERE user_name = 'rob' and listened_at < 1580085314 order by listened_at desc limit 50;`
      • 2020-05-08 12918, 2020

      • shivam-kapila
        I ran that for my username. Lemme try for yours
      • 2020-05-08 12933, 2020

      • ruaok
        gonna be different.
      • 2020-05-08 12931, 2020

      • ruaok
        oh, you don't have the full DB. never mind.
      • 2020-05-08 12939, 2020

      • alastairp
        shivam-kapila: cost isn't seconds. it's a "cost", unitless, but can be compared between different explain statements
      • 2020-05-08 12958, 2020

      • alastairp
        you can use `explain analyze` and it will print the query plan _and_ perform the query, and show the runtime at the end
      • 2020-05-08 12926, 2020

      • shivam-kapila
        ruaok: Can I steal your last.fm data :)
      • 2020-05-08 12938, 2020

      • alastairp
        the `cost=0.15..14.83` shows that it could potentially cost anywhere from 0.15 to 14.83 to perform this query. but 14 is an upper estimate
      • 2020-05-08 12940, 2020

      • shivam-kapila
        alastairp: Oh sorry. I didn't know that
      • 2020-05-08 12942, 2020

      • ruaok
        for me that query gives an explain that is (2197 rows) long.
      • 2020-05-08 12954, 2020

      • alastairp
        no apology needed, that's why I was explaining it
      • 2020-05-08 12908, 2020

      • ruaok
        thanks for the alastairp. :)
      • 2020-05-08 12911, 2020

      • ruaok
        that
      • 2020-05-08 12953, 2020

      • ruaok
        the gist of the story is: we need to never make queries that have an open ended interval. -- they must always be closed.
      • 2020-05-08 12943, 2020

      • alastairp
        listened_at < and listened_at > ?
      • 2020-05-08 12950, 2020

      • ruaok
        yes.
      • 2020-05-08 12901, 2020

      • ruaok
        which is a... a bit tricky
      • 2020-05-08 12903, 2020

      • alastairp
        even if it covers the whole time period?
      • 2020-05-08 12936, 2020

      • ruaok
        so, the way timescale differs from PG is how it deals with hypertables.
      • 2020-05-08 12944, 2020

      • alastairp
        way back on the original storage engine didn't we have a max age which was the lastfm launch date?
      • 2020-05-08 12951, 2020

      • ruaok
        hypertables are a new construct in timescale
      • 2020-05-08 12920, 2020

      • ruaok
        and as data gets added, the table is automatically partitioned on time, in this case listened_at.
      • 2020-05-08 12949, 2020

      • ruaok
        and if you run a query near the latest data and don't lower bound your query, it must do an index lookup on ALL table segments.
      • 2020-05-08 12957, 2020

      • alastairp
        yeah, for sure
      • 2020-05-08 12912, 2020

      • alastairp
        just out of interest, do you know how much a hypertable differs from a regular postgres partitioned table?
      • 2020-05-08 12915, 2020

      • ruaok
        but, then how do we pick a lower bound that is safe?
      • 2020-05-08 12935, 2020

      • shivam-kapila
        It get it no. For < it scans down every hypertable chunk. Am I correct?
      • 2020-05-08 12940, 2020

      • shivam-kapila
        now*
      • 2020-05-08 12950, 2020

      • shivam-kapila
        Because there is no lower bound
      • 2020-05-08 12952, 2020

      • ruaok
        not that much, I think. other than that the partitioning is automatic and that you have continuous aggregates.
      • 2020-05-08 12907, 2020

      • ruaok
        shivam-kapila: exactly.
      • 2020-05-08 12925, 2020

      • alastairp
        and the issue with finding the lower bound is that if you want to return 100 items, you have no idea if you have to go back a month or 2 years to get that?
      • 2020-05-08 12934, 2020

      • ruaok
        now, mind you, I am not convinced that this is our only problem why pages load slowly.
      • 2020-05-08 12940, 2020

      • ruaok
        alastairp: that!
      • 2020-05-08 12944, 2020

      • alastairp
        what's the size of a partition?
      • 2020-05-08 12953, 2020

      • ruaok
        user defined.
      • 2020-05-08 12903, 2020

      • ruaok
        for us I think its a few days, maybe a week.
      • 2020-05-08 12906, 2020

      • alastairp
        what's the duration that we've defined for a parition
      • 2020-05-08 12906, 2020

      • alastairp
        right
      • 2020-05-08 12920, 2020

      • alastairp
        and a partition is on the date, not (user, date)
      • 2020-05-08 12934, 2020

      • ruaok
        I believe that is correct.
      • 2020-05-08 12950, 2020

      • alastairp
        we could always do multiple queries
      • 2020-05-08 12958, 2020

      • ruaok
        so, if we query and get less than our LIMIT returned, we can remove or extend the lower bound.
      • 2020-05-08 12901, 2020

      • ruaok
        heh. :)
      • 2020-05-08 12917, 2020

      • alastairp
        maybe a fibonacci-style increasing of lower bound
      • 2020-05-08 12930, 2020

      • alastairp
        a week, a month, 6 months, a year, 3 years
      • 2020-05-08 12922, 2020

      • ruaok
        yeah.