Giter Club home page Giter Club logo

Comments (6)

Winslett avatar Winslett commented on August 14, 2024

@tvb, Good catch! This will probably be a catalyst for a test suite, which I've been pondering on.

from governor.

Winslett avatar Winslett commented on August 14, 2024

Actually, I reverted that change because it wasn't a typo, it was just confusing code.

The call to last_operation at https://github.com/compose/governor/blob/master/helpers/etcd.py#L85 is calling the last_operation method on the state_handler(), which retrieves an xlog location from Postgres.

The last_leader_operation method at https://github.com/compose/governor/blob/master/helpers/etcd.py#L90 is a call to etcd, which retrieves the last recorded xlog location stored in etcd.

The method names should be refactored to avoid confusion.

from governor.

tvb avatar tvb commented on August 14, 2024

Hmmm then I have another issue:

Traceback (most recent call last):
  File "./governor.py", line 61, in <module>
    logging.info(ha.run_cycle())
  File "/var/lib/postgresql/governor/helpers/ha.py", line 70, in run_cycle
    self.update_lock()
  File "/var/lib/postgresql/governor/helpers/ha.py", line 25, in update_lock
    return self.etcd.update_leader(self.state_handler)
  File "/var/lib/postgresql/governor/helpers/etcd.py", line 85, in update_leader
    self.put_client_path("/optime/leader", {"value": state_handler.last_operation()})
AttributeError: Postgresql instance has no attribute 'last_operation'
LOG:  received fast shutdown request
waiting for server to shut down....LOG:  aborting any active transactions
LOG:  autovacuum launcher shutting down
LOG:  shutting down
LOG:  database system is shut down
 done
server stopped

Changed that line and now I get:

Traceback (most recent call last):
  File "./governor.py", line 57, in <module>
    postgresql.follow_no_leader()
AttributeError: Postgresql instance has no attribute 'follow_no_leader'
pg_ctl: PID file "data/postgres/postmaster.pid" does not exist
Is server running?

from governor.

Winslett avatar Winslett commented on August 14, 2024

Create a new master branch, and see if the problem persists.

git fetch origin && git checkout origin/master -b new_master

I force pushed to erase the change. I'll quit doing that.

from governor.

tvb avatar tvb commented on August 14, 2024

I have not pulled the latest changes you made today.

from governor.

Winslett avatar Winslett commented on August 14, 2024

That method has existed since 3 days ago: https://github.com/compose/governor/blob/master/helpers/postgresql.py#L210

from governor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.