#metabrainz

/

      • D4RK-PH0ENiX joined the channel
      • 2018-10-18 29153, 2018

      • D4RK-PH0ENiX has quit
      • 2018-10-18 29156, 2018

      • SothoTalKer has quit
      • 2018-10-18 29139, 2018

      • SothoTalKer joined the channel
      • 2018-10-18 29152, 2018

      • D4RK-PH0ENiX joined the channel
      • 2018-10-18 29154, 2018

      • Leo_Verto_ joined the channel
      • 2018-10-18 29158, 2018

      • Leo_Verto has quit
      • 2018-10-18 29158, 2018

      • Leo_Verto_ is now known as Leo_Verto
      • 2018-10-18 29158, 2018

      • outsidecontext joined the channel
      • 2018-10-18 29107, 2018

      • Sophist_UK joined the channel
      • 2018-10-18 29150, 2018

      • Sophist-UK has quit
      • 2018-10-18 29110, 2018

      • UmkaDK joined the channel
      • 2018-10-18 29147, 2018

      • UmkaDK has quit
      • 2018-10-18 29138, 2018

      • UmkaDK joined the channel
      • 2018-10-18 29121, 2018

      • travis-ci joined the channel
      • 2018-10-18 29122, 2018

      • travis-ci
        metabrainz/picard#3925 (master - b141078 : Philipp Wolfer): The build passed.
      • 2018-10-18 29122, 2018

      • travis-ci
      • 2018-10-18 29122, 2018

      • travis-ci
      • 2018-10-18 29122, 2018

      • travis-ci has left the channel
      • 2018-10-18 29128, 2018

      • antlarr2 is now known as antlarr
      • 2018-10-18 29107, 2018

      • UmkaDK has quit
      • 2018-10-18 29136, 2018

      • UmkaDK joined the channel
      • 2018-10-18 29104, 2018

      • UmkaDK has quit
      • 2018-10-18 29108, 2018

      • UmkaDK joined the channel
      • 2018-10-18 29146, 2018

      • Sophist_UK has quit
      • 2018-10-18 29152, 2018

      • Sophist-UK joined the channel
      • 2018-10-18 29128, 2018

      • Sophist_UK joined the channel
      • 2018-10-18 29109, 2018

      • Sophist-UK has quit
      • 2018-10-18 29135, 2018

      • code_master5 joined the channel
      • 2018-10-18 29149, 2018

      • ruaok
        moooooin!
      • 2018-10-18 29124, 2018

      • code_master5
        ruaok: good morning! 😁
      • 2018-10-18 29132, 2018

      • ruaok
        :)
      • 2018-10-18 29157, 2018

      • ruaok
        everyone: I chatted with Microsoft yesterday and they continue to sound like a different company from back in the day.
      • 2018-10-18 29125, 2018

      • ruaok
        they feel that they are deriving a lot of value from our data and would like to support our mission further.
      • 2018-10-18 29152, 2018

      • ruaok
        I've started to collect my thoughts in (ironically) a google doc.
      • 2018-10-18 29145, 2018

      • alastairp
        nice. are they currently saying "we are interested in supporting in some undefined way", or "we'll pay for data", or something different?
      • 2018-10-18 29146, 2018

      • ruaok
        alastairp: how is your next week looking? You free on tuesday for lunch? I wanna catch up...
      • 2018-10-18 29112, 2018

      • alastairp
        ruaok: got a workshop in Nice coming up, maybe not free until 2nd week of nov?
      • 2018-10-18 29115, 2018

      • ruaok
        they are saying: " ask for whatever that would support your mission. we'll consider all reasonable requests"
      • 2018-10-18 29141, 2018

      • ruaok
        I'm off to another mystery trip then.
      • 2018-10-18 29154, 2018

      • ruaok
        tomorrow possibly?
      • 2018-10-18 29108, 2018

      • alastairp
        I'm already filled up with meetings tomorrow :(
      • 2018-10-18 29111, 2018

      • ruaok wants to plant ideas of world domination into alastairp's head
      • 2018-10-18 29114, 2018

      • ruaok
        bah.
      • 2018-10-18 29132, 2018

      • alastairp
        yeah, I've become the person who everyone has meetings with to learn how to do stuff
      • 2018-10-18 29139, 2018

      • ruaok
        ok, I'm working on a doc to collect my thoughts. maybe when I get it more fleshed out I can share it with you.
      • 2018-10-18 29140, 2018

      • alastairp
        got to work out how to get out of that...
      • 2018-10-18 29143, 2018

      • alastairp
        ok
      • 2018-10-18 29157, 2018

      • ruaok
        easy, start fucking things up and teaching people bad things.
      • 2018-10-18 29103, 2018

      • alastairp
        oh, next week? week of 22nd? I think I'll be free that week
      • 2018-10-18 29116, 2018

      • ruaok
        "no need to call free() after using malloc(), C has garbage collection!"
      • 2018-10-18 29137, 2018

      • ruaok
        yes 23, or even 22.
      • 2018-10-18 29108, 2018

      • alastairp
        ok, provisionally 23rd is OK. I'll have to check if anything comes up tomorrow
      • 2018-10-18 29130, 2018

      • ruaok stuffs it into the calendar
      • 2018-10-18 29156, 2018

      • alastairp
        elsa y fred?
      • 2018-10-18 29106, 2018

      • ruaok
        sure! that is super easy.
      • 2018-10-18 29115, 2018

      • alastairp
        tut tut looks like rain
      • 2018-10-18 29149, 2018

      • ruaok moves his precious collections of google shirts further away from the rain
      • 2018-10-18 29143, 2018

      • reosarevok
        alastairp: make ruaok come with you to all those meetings for a week
      • 2018-10-18 29145, 2018

      • ruaok
        samj1912: [for later] have you seen the security vulnerabilities for lucene that github has highlighted?
      • 2018-10-18 29151, 2018

      • reosarevok
        Guaranteed to no longer be invited to any
      • 2018-10-18 29116, 2018

      • ruaok
        "there is no need to match your socks and I'd be happy to cut your hair" ought to do it.
      • 2018-10-18 29127, 2018

      • code_master5
        iliekcomputers: Hey! are you up to discuss on https://tickets.metabrainz.org/browse/CB-298 ? 🙄
      • 2018-10-18 29128, 2018

      • BrainzBot
        CB-298: Make database dumps in a transaction
      • 2018-10-18 29101, 2018

      • iliekcomputers
        code_master5: hi!
      • 2018-10-18 29113, 2018

      • code_master5
        iliekcomputers: hi! 😅
      • 2018-10-18 29117, 2018

      • iliekcomputers
        Sorry, I've been sleeping for the past two days
      • 2018-10-18 29125, 2018

      • iliekcomputers
        What's the problem you're facing?
      • 2018-10-18 29140, 2018

      • code_master5
        iliekcomputers: It's okay.
      • 2018-10-18 29149, 2018

      • code_master5
        iliekcomputers: So, inside db folder, we've all the files (functions) that perform some operation on the database. Right?
      • 2018-10-18 29118, 2018

      • iliekcomputers
        Yes
      • 2018-10-18 29112, 2018

      • zas
        ruaok: we'll be discussing about ways to upgrade solr tonight with samj1912 (related to security warnings reported by github)
      • 2018-10-18 29100, 2018

      • ruaok
        > Sorry, I've been sleeping for the past two days
      • 2018-10-18 29108, 2018

      • ruaok
        LOL, yes. I got 2 nights of 12 hours in myself.
      • 2018-10-18 29114, 2018

      • code_master5
        iliekcomputers: Whenever you begin some transaction using the connection object, you need to use the same connection object to execute a query (which is part of that transaction).
      • 2018-10-18 29117, 2018

      • ruaok
        zas: great.
      • 2018-10-18 29101, 2018

      • code_master5
        iliekcomputers: currently, all the function create their own connection object and close it before returning the result.
      • 2018-10-18 29107, 2018

      • code_master5
        *function
      • 2018-10-18 29111, 2018

      • code_master5
        *functions
      • 2018-10-18 29102, 2018

      • iliekcomputers
        Ok
      • 2018-10-18 29102, 2018

      • iliekcomputers
        What's the problem?
      • 2018-10-18 29119, 2018

      • code_master5
        iliekcomputers: the problem is that, in order to make the codebase support transactions, we need to rewrite the functions (all of them, which execute some query on db).
      • 2018-10-18 29130, 2018

      • code_master5
        iliekcomputers: The idea is to pass the same connection object to each function.
      • 2018-10-18 29114, 2018

      • iliekcomputers
        code_master5: the ticket in question only wants to do the dumps inside a transaction
      • 2018-10-18 29102, 2018

      • iliekcomputers
        If you begin a transaction before a dump, create the dump, then rollback, the dump is guaranteed to be consistent.
      • 2018-10-18 29149, 2018

      • code_master5
        iliekcomputers: The function for json dumps requires to extract licenses, distinct entities, reviews etc to be extracted from the database. What if, while the data for dumping is being extracted and some user adds or deletes the reviews?
      • 2018-10-18 29110, 2018

      • CatQuest
        make readonly at the time?
      • 2018-10-18 29123, 2018

      • CatQuest
        should only be a short time
      • 2018-10-18 29124, 2018

      • alastairp
        code_master5: for the most part you can assume that that won't happen
      • 2018-10-18 29109, 2018

      • alastairp
        related to that, we could think about something like https://tickets.metabrainz.org/projects/AB/issues… the future for CB too
      • 2018-10-18 29110, 2018

      • code_master5
        alastairp: Then why do we need to work on this issue in the first place? 🤔
      • 2018-10-18 29136, 2018

      • alastairp
        because best practices dictate that doing this kind of operation in a transaction is a good idea
      • 2018-10-18 29147, 2018

      • ruaok nods
      • 2018-10-18 29152, 2018

      • ruaok
        to make the database dump consistent.
      • 2018-10-18 29109, 2018

      • ruaok
        so that the timestamp in the dump EXACTLY represents what is in the dump.
      • 2018-10-18 29114, 2018

      • iliekcomputers
        Oh and code_master5, you shouldn't wait for me or anyone to come online before you ask your questions, just ask, people will help if they're around and can.
      • 2018-10-18 29119, 2018

      • code_master5
        iliekcomputers: Well sorry I'm new here. I didn't know that. I asked, but someone pointed to you. 😅
      • 2018-10-18 29151, 2018

      • ruaok
        no need to be sorry. we're just showing you round our community. :)
      • 2018-10-18 29123, 2018

      • code_master5
        ruaok: Ok. 😅
      • 2018-10-18 29117, 2018

      • code_master5
        iliekcomputers: I can't understand how the dump will be consistent if we don't perform the underlying operations in a transaction.
      • 2018-10-18 29148, 2018

      • ruaok
        iliekcomputers, alastairp: seemingly unrelated, but not really:
      • 2018-10-18 29150, 2018

      • ruaok
      • 2018-10-18 29156, 2018

      • ruaok
      • 2018-10-18 29101, 2018

      • reosarevok
        bitmap: how's the relationships stuff coming along? :)
      • 2018-10-18 29122, 2018

      • ruaok
        some background reading on my current music industry noodling. start with beer. :)
      • 2018-10-18 29128, 2018

      • reosarevok
        ruaok: wait, but isn't everyone already a snobbish hipster about music?
      • 2018-10-18 29145, 2018

      • ruaok
        apparently not quite enough yet.
      • 2018-10-18 29141, 2018

      • iliekcomputers
        code_master5: I have a feeling that new changes won't be seen in the transaction once you've begun it
      • 2018-10-18 29157, 2018

      • iliekcomputers
        But I'll have to look at what sqlalchemy does exacrly
      • 2018-10-18 29100, 2018

      • ruaok
        iliekcomputers: correct.
      • 2018-10-18 29116, 2018

      • code_master5
        iliekcomputers: Yeah. Me too.
      • 2018-10-18 29128, 2018

      • ruaok
        that is a function of the DB, not of sqlalchemy. it is called transaction isolation.
      • 2018-10-18 29129, 2018

      • code_master5
        iliekcomputers: Well, although you're starting a transaction, but you're also starting new connections. And the connections are the ones which are extracting data. A transaction object can be associated with a single connection only. So!.. https://docs.sqlalchemy.org/en/latest/core/connec…
      • 2018-10-18 29138, 2018

      • code_master5
        other connection objects are independent of the transaction.
      • 2018-10-18 29155, 2018

      • iliekcomputers
        code_master5: what i was trying to say was the things that the new connections change won't be reflected in the transaction you've opened
      • 2018-10-18 29153, 2018

      • code_master5
        iliekcomputers: Yes! you're right. But that only applies if the connection object related to that transaction performs the reading. The point is that the dump is being created from the data read by independent connections (and they've nothing to do with the transaction).
      • 2018-10-18 29138, 2018

      • iliekcomputers
        code_master5: oh
      • 2018-10-18 29143, 2018

      • iliekcomputers
        Then that should be fixed
      • 2018-10-18 29117, 2018

      • iliekcomputers
        Once a transaction is created, you should only read data from that transaction's object
      • 2018-10-18 29138, 2018

      • code_master5
        iliekcomputers: Exactly!
      • 2018-10-18 29157, 2018

      • iliekcomputers
        Great :)
      • 2018-10-18 29141, 2018

      • code_master5
        otherwise, the independent connections are just equivalent to some other connection that might be updating database at the same time. 🤔
      • 2018-10-18 29143, 2018

      • iliekcomputers
        Yeah
      • 2018-10-18 29107, 2018

      • code_master5
        iliekcomputers: So now... It is like we've to pass the same connection object to every function which accesses the database (atleast those which're being invoked by dump function). But then, we cannot use context managers to perform the operations.
      • 2018-10-18 29129, 2018

      • iliekcomputers
        Not every function
      • 2018-10-18 29138, 2018

      • iliekcomputers
        Just the ones that the dumps use
      • 2018-10-18 29149, 2018

      • code_master5
        iliekcomputers: Yeah.
      • 2018-10-18 29158, 2018

      • iliekcomputers
        Context managers?
      • 2018-10-18 29113, 2018

      • code_master5
        iliekcomputers: Python context managers..
      • 2018-10-18 29135, 2018

      • code_master5
        with db.engine.connect() as connection: ....
      • 2018-10-18 29150, 2018

      • iliekcomputers
        Just pass the connection to the other functions
      • 2018-10-18 29116, 2018

      • code_master5
        iliekcomputers: That will not work.
      • 2018-10-18 29131, 2018

      • iliekcomputers
        why not?
      • 2018-10-18 29143, 2018

      • code_master5
        iliekcomputers: Because context managers automatically close connection before returning the results.
      • 2018-10-18 29101, 2018

      • code_master5
        iliekcomputers: We need to close connection only after transaction is over.
      • 2018-10-18 29138, 2018

      • code_master5
        So, that means, falling back to try... except.. finally..
      • 2018-10-18 29108, 2018

      • iliekcomputers
      • 2018-10-18 29135, 2018

      • iliekcomputers
        this is what i was trying to say.
      • 2018-10-18 29121, 2018

      • code_master5
        iliekcomputers: Lemme check!
      • 2018-10-18 29125, 2018

      • iliekcomputers
        the with clause won't close the connection just because you pass to a different function.
      • 2018-10-18 29110, 2018

      • iliekcomputers
        ruaok: those articles are interesting.
      • 2018-10-18 29117, 2018

      • iliekcomputers
        >Sold on the basis of its quality and non-corporate pedigree, the once-niche market now turns over around $20bn each year – more than the entire global recorded music business.
      • 2018-10-18 29123, 2018

      • D4RK-PH0ENiX has quit
      • 2018-10-18 29146, 2018

      • iliekcomputers
        Whaaaat?
      • 2018-10-18 29129, 2018

      • discopatrick joined the channel
      • 2018-10-18 29123, 2018

      • ruaok
        iliekcomputers: the music industry is tiny. a wag of google's tail and it could be all destroyed.
      • 2018-10-18 29143, 2018

      • ruaok
        but, the lessons are key. community, collaboration and pride in your product.
      • 2018-10-18 29115, 2018

      • Sophist-UK joined the channel
      • 2018-10-18 29150, 2018

      • ruaok
      • 2018-10-18 29157, 2018

      • Sophist_UK has quit