code: public void commitBlockSynchronization(Block block,
        long newgenerationstamp, long newlength,
        boolean closeFile, boolean deleteblock, DatanodeID[] newtargets
        ) throws IOException {
      IOException last = new IOException("No DatanodeProtocol found.");
      for (int i = 0; i < numProtocol; i++) {
        try {
          if (node[i] != null) {
            node[i].commitBlockSynchronization(block, newgenerationstamp,
                                               newlength, closeFile,
                                               deleteblock, newtargets);
            return;
          }
        } catch (IOException e) {
          last = e;
          LOG.info("Server " + i + " failed at commitBlockSynchronization.", e);
        }
      }
      throw last; // fail if all DatanodeProtocol object failed.
    }
docs: {@inheritDoc}