TODO 8.94 KB
Newer Older
1 2 3 4 5
  Documentation
    - Clarify node state signification, and consider renaming them in the code.
      Ideas:
        TEMPORARILY_DOWN becomes UNAVAILABLE
        BROKEN is removed ?
6 7 8
    - Clarify the use of each error codes:
      - NOT_READY removed (connection kept opened until ready)
      - Split PROTOCOL_ERROR (BAD IDENTIFICATION, ...)
9 10 11 12
    - Add docstrings (think of doctests)

  Code

13
    Code changes often impact more than just one node. They are categorised by
14
    node where the most important changes are needed.
15 16

    General
17
    - Review XXX/TODO code tags (CODE)
18
    - Coverage for functional tests (i.e. collect results from subprocesses)
19 20
    - When all cells are OUT_OF_DATE in backup mode, the one with most data
      could become UP_TO_DATE with appropriate backup_tid, so that the cluster
Julien Muchembled's avatar
Julien Muchembled committed
21
      stays operational. (FEATURE)
22
    - Finish renaming UUID into NID everywhere (CODE)
23
    - Implements delayed connection acceptation.
24
      Currently, any node that connects too early to another that is busy for
25 26 27 28 29 30 31 32
      some reasons is immediately rejected with the 'not ready' error code. This
      should be replaced by a queue in the listening node that keep a pool a
      nodes that will be accepted late, when the conditions will be satisfied.
      This is mainly the case for :
        - Client rejected before the cluster is operational
        - Empty storages rejected during recovery process
      Masters implies in the election process should still reject any connection
      as the primary master is still unknown.
33 34 35 36 37
    - Implement transaction garbage collection API (FEATURE)
      NEO packing implementation does not update transaction metadata when
      deleting object revisions. This inconsistency must be made possible to
      clean up from a client application, much in the same way garbage
      collection part of packing is done.
38
    - Factorise node initialisation for admin, client and storage (CODE)
39 40
      The same code to ask/receive node list and partition table exists in too
      many places.
41 42
    - Clarify handler methods to call when a connection is accepted from a
      listening conenction and when remote node is identified
43
      (cf. neo/lib/bootstrap.py).
44 45 46
    - Choose how to handle a storage integrity verification when it comes back.
      Do the replication process, the verification stage, with or without
      unfinished transactions, cells have to set as outdated, if yes, should the
47
      partition table changes be broadcasted ? (BANDWITH, SPEED)
48
    - Make SIGINT on primary master change cluster in STOPPING state.
49
    - Review PENDING/HIDDEN/SHUTDOWN states, don't use notifyNodeInformation()
50
      to do a state-switch, use a exception-based mechanism ? (CODE)
51 52
    - Review handler split (CODE)
      The current handler split is the result of small incremental changes. A
53
      global review is required to make them square.
Julien Muchembled's avatar
Julien Muchembled committed
54
    - Review node notifications. Eg. A storage don't have to be notified of new
Grégory Wisniewski's avatar
Grégory Wisniewski committed
55
      clients but only when one is lost.
56 57 58 59
    - Review transactional isolation of various methods
      Some methods might not implement proper transaction isolation when they
      should. An example is object history (undoLog), which can see data
      committed by future transactions.
60 61
    - Add a 'devid' storage configuration so that master do not distribute
      replicated partitions on storages with same 'devid'.
Julien Muchembled's avatar
Julien Muchembled committed
62 63 64 65 66
    - Fix race conditions between client-to-storage operations and moved
      partitions. Currently, reads succeed because feeding nodes don't delete
      anything while the cluster is operational, for performance reasons:
      deletion of dropped partitions must be reimplemented in a scalable way.
      (HIGH AVAILABILITY)
67 68

    Storage
69
    - Use libmysqld instead of a stand-alone MySQL server.
70
    - Notify master when storage becomes available for clients (LATENCY)
71 72
      Currently, storage presence is broadcasted to client nodes too early, as
      the storage node would refuse them until it has only up-to-date data (not
73
      only up-to-date cells, but also a partition table and node states).
74 75 76 77 78
    - In backup mode, 2 simultaneous replication should be possible so that:
      - outdated cells does not block backup for too long time
      - constantly modified partitions does not prevent outdated cells to
        replicate
      Current behaviour is undefined and the above 2 scenarios may happen.
Grégory Wisniewski's avatar
Grégory Wisniewski committed
79 80
    - Create a specialized PartitionTable that know the database and replicator
      to remove duplicates and remove logic from handlers (CODE)
81
    - Consider insert multiple objects at time in the database, with taking care
82
      of maximum SQL request size allowed. (SPEED)
83 84
    - Make listening address and port optionnal, and if they are not provided
      listen on all interfaces on any available port.
85
    - Make replication speed configurable (HIGH AVAILABILITY)
Julien Muchembled's avatar
Julien Muchembled committed
86 87
      In its current implementation, replication runs at lowest priority, to
      not degrade performance for client nodes. But when there's only 1 storage
88 89
      left for a partition, it may be wanted to guarantee a minimum speed to
      avoid complete data loss if another failure happens too early.
90 91 92
    - Find a way not to always start replication from the beginning. Currently,
      a temporarily down nodes can't replicate from where it was interrupted,
      which is an issue on big databases. (SPEED)
93 94 95 96 97 98
    - Pack segmentation & throttling (HIGH AVAILABILITY)
      In its current implementation, pack runs in one call on all storage nodes
      at the same time, which lcoks down the whole cluster. This task should
      be split in chunks and processed in "background" on storage nodes.
      Packing throttling should probably be at the lowest possible priority
      (below interactive use and below replication).
99 100 101 102 103 104 105 106
    - Verify data checksum on reception (FUNCTIONALITY)
      In current implementation, client generates a checksum before storing,
      which is only checked upon load. This doesn't prevent from storing
      altered data, which misses the point of having a checksum, and creates
      weird decisions (ex: if checksum verification fails on load, what should
      be done ? hope to find a storage with valid checksum ? assume that data
      is correct in storage but was altered when it travelled through network
      as we loaded it ?).
107 108 109 110 111
    - Check replicas: (HIGH AVAILABILITY)
      - Automatically tell corrupted cells to fix their data when a good source
        is known.
      - Add an option to also check all rows of trans/obj/data, instead of only
        keys (trans.tid & obj.{tid,oid}).
112 113 114

    Master
    - Master node data redundancy (HIGH AVAILABILITY)
115
      Secondary master nodes should replicate primary master data (ie, primary
116
      master should inform them of such changes).
117
      This data takes too long to extract from storage nodes, and losing it
118 119 120
      increases the risk of starting from underestimated values.
      This risk is (currently) unavoidable when all nodes stop running, but this
      case must be avoided.
Julien Muchembled's avatar
Julien Muchembled committed
121 122 123
    - If the cluster can't start automatically because the last partition table
      is not operational, allow the user to select an older operational one,
      and truncate the DB.
124 125
    - Optimize operational status check by recording which rows are ready
      instead of parsing the whole partition table. (SPEED)
126 127

    Client
128
    - Merge Application into Storage (SPEED)
Julien Muchembled's avatar
Julien Muchembled committed
129
    - Optimize cache.py by rewriting it either in C or Cython (LOAD LATENCY)
130
    - Use generic bootstrap module (CODE)
Julien Muchembled's avatar
Julien Muchembled committed
131 132
    - If too many storage nodes are dead, the client should check the partition
      table hasn't changed by pinging the master and retry if necessary.
133 134
    - Implement IStorageRestoreable (ZODB API) in order to preserve data
      serials (i.e. undo information).
135
    - Fix and reenable deadlock avoidance (SPEED). This is required for
136
      neo.threaded.test.Test.testDeadlockAvoidance
137

138 139
    Admin
    - Make admin node able to monitor multiple clusters simultaneously
Julien Muchembled's avatar
Julien Muchembled committed
140
    - Send notifications (ie: mail) when a storage or master node is lost
141
    - Add ctl command to list last transactions, like fstail for FileStorage.
142

143
    Tests
144 145
    - Use another mock library: Python 3.3+ has unittest.mock, which is
      available for earlier versions at https://pypi.python.org/pypi/mock
146

147
  Later
148
    - Consider auto-generating cluster name upon initial startup (it might
149
      actualy be a partition property).
150
    - Consider ways to centralise the configuration file, or make the
151 152
      configuration updatable automaticaly on all nodes.
    - Consider storing some metadata on master nodes (partition table [version],
153
      ...). This data should be treated non-authoritatively, as a way to lower
154
      the probability to use an outdated partition table.
155
    - Decentralize primary master tasks as much as possible (consider
156
      distributed lock mechanisms, ...)
157
    - Choose how to compute the storage size
158 159 160
    - Investigate delta compression for stored data
      Idea would be to have a few most recent revisions being stored fully, and
      older revision delta-compressed, in order to save space.