IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2008, 9:44:43 PM (18 years ago)
Author:
bills
Message:

when opening a file in nebulous for writing, cull all but one existing
instance for consistencty (may need some work with respect to locking
versus replication)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r20260 r20341  
    16041604        nebServer *server = nebServerAlloc(neb_server);
    16051605        if (!server) {
    1606             psError(PM_ERR_SYS, true, "failed to create a nebServer object: %s", nebErr(server));
    1607             nebServerFree(server);
     1606            psError(PM_ERR_SYS, true, "failed to create a nebServer object.");
    16081607            return NULL;
    16091608        }
     
    16261625                return NULL;
    16271626            }
     1627        } else if (create || trunc) {
     1628            // object exists and it looks like the caller intends to write to it
     1629            // delete all but one instance
     1630            if (!nebCullAllButOne(server,filename)) {
     1631                psError(PM_ERR_SYS, true, "failed to cull instances of existing nebulous file: %s\n%s",
     1632                    filename, nebErr(server));
     1633                return NULL;
     1634            }
     1635            // we don't know which instances got culled so get the instance again
     1636            if (!(nebfile = nebFind(server, filename))) {
     1637                psError(PM_ERR_SYS, true, "failed to find instance of existing nebulous file: %s\n%s",
     1638                    filename, nebErr(server));
     1639                return NULL;
     1640            }
    16281641        }
    16291642
Note: See TracChangeset for help on using the changeset viewer.