This chapter briefly describes the architecture of ObjectStore and provides an overview of management tasks. For an introduction to object-oriented database management, including concepts such as persistence, see the first several chapters of the ObjectStore C++ API User Guide.
A rawfs can contain directories, subdirectories, and databases, just like the native file system. It can include links, but each link must be to another ObjectStore rawfs. The ObjectStore Server manages everything in the rawfs; everything in the rawfs is invisible to the operating system. ObjectStore provides utilities and os_dbutil class methods for operating on databases and directories in a rawfs. An ObjectStore Server can manage one rawfs, which consists of one or more Server partitions.
When you create a rawfs database, you specify a pathname. The Server determines where in the rawfs to store your database. Thus, the logical directory structure might not map directly to the physical placement of the databases in the partitions. For example, two rawfs databases in different ObjectStore directories might be stored in the same partition.
hostname::/database_pathnameA double colon separates the host name from the database pathname. The name of a rawfs database always starts at root; it is never relative to a working directory. Slashes always separate the levels of a rawfs database name, regardless of the platform. Case is significant. For example, the following two pathnames identify different databases:
hostess::/accounts/payable/JUNE hostess::/accounts/payable/juneYou can create a rawfs during ObjectStore installation or at any time after installation. See the chapter specific to your platform for instructions.
Usually, a Server must be running before any ObjectStore application can access databases on the host. (A locator file allows access to databases residing on a host that is not running a Server. See Chapter 5, Using Locator Files to Set Up Server-Remote Databases, for further information.)
An application can use databases that are stored on different hosts and managed by different Servers. A Server can serve clients on any number of hosts.
Multiple Servers on a host
A host can run one Server of a given ObjectStore release. You can run two ObjectStore Servers on the same host if they are different versions of ObjectStore. For example, you can run a Release 5 and Release 4 Server on the same host. Start them on different ports and use the ports file to let clients know which one to contact. See Modifying Network Port Settings for details.
A network can have a number of Servers.
What Does the Client Application Do?
ObjectStore links the client library into each ObjectStore application. In this way, each ObjectStore application is an ObjectStore client that
To change the default size of the client cache, use the OS_CACHE_SIZE environment variable. See OS_CACHE_SIZE.
Any number of clients can run on a particular host. These clients can contact
A Cache Manager starts automatically when an ObjectStore application starts, if a Cache Manager is not already running on the host. Each host that runs an ObjectStore application must have one Cache Manager. A single Cache Manager can handle callback messages for any number of client applications running on that host.
If you are running clients from two different major releases of ObjectStore, there are two Cache Managers - one for each release. Unlike running different Servers on one host, you do not need to configure ports.
The name of the Cache Manager executable is oscmgr4.
On UNIX, the oscminit executable starts oscmgr4. Normally, you never need to invoke oscminit.
The Cache Manager is involved in the following situations:
The Server cannot send callback messages directly to the client because the client might not be listening; the client might be busy running the application. The Cache Manager determines whether the read or write permission can be released or if the client requesting permission must wait.
If you are running an ObjectStore application that uses a database that nobody else is using, there are no callback messages for that database.
For information about ownership and locks, see Callback Messages Background.
Commseg
The commseg (communications segment) is where the Cache Manager maintains information about permissions on pages and whether or not the client is actually using the page. Each client has its own commseg. For every page in the cache, there is a corresponding item in the commseg.
OS_COMMSEG_RESERVED_SIZE | Maximum size of the commseg |
---|---|
OS_COMMSEG_SIZE | Size of the commseg |
OS_COMMSEG_START | Starting address of the commseg (rarely specified; ObjectStore usually determines this) |
UNIX
By default, ObjectStore places the commseg file in the /tmp/ostore directory. You can specify an alternate directory by setting the OS_COMMSEG_DIR environment variable. Another way to change the default is to set the Commseg Directory parameter in the $OS_ROOTDIR/etc/host_cache_manager_parameters file. Windows and OS/2
The operating system determines the location of the commseg in shared memory. The commseg is not a file; it is a region of virtual memory. The illustration that follows shows the ObjectStore processes specific to Windows and OS/2.
Managing Processes
ObjectStore includes three main processes that communicate with each other to manage your data:
ObjectStore uses network connections to communicate among Server, client, and Cache Manager processes. The kind of network connection used depends on your platform. Normally, you do not need to modify network connections. However, if you do need to make changes, see Modifying Network Port Settings.
Starting ObjectStore Processes
Server
The chapter supporting your platform provides instructions for starting the Server on your platform. Usually, the installation procedure arranges for the Server to be started automatically when the system is booted.
There are many Server parameters you can set to determine the behavior of the Server. Chapter 2, Server Parameters, describes each parameter. When you modify a parameter, you must shut down and restart the Server for the parameter to take effect.
Client
When a client application starts, it tries to connect to the Cache Manager on that machine. If a Cache Manager is not running, ObjectStore starts one. Cache Manager
The Cache Manager starts automatically if one is not already running when a client application starts. Windows NT
On Windows NT, the Server and Cache Manager normally run as NT Services. You can use the Services applet in the Control Panel to start and stop the Server and Cache Manager and to determine whether or not they start automatically when you boot the system. Stopping ObjectStore Processes
Server
You need to shut down the Server
Dangling clients are clients that are still attached to the Server even though they no longer exist. This can happen when a client is halted abnormally rather than being stopped in the usual manner. See ossvrclntkill: Disconnecting a Client Thread on a Server.
If necessary, you can use the ossvrclntkill utility to sever the connection between a client and the Server. This disconnects the client. See ossvrclntkill: Disconnecting a Client Thread on a Server for details.
Cache Manager
Before you shut down the Cache Manager, notify clients that you are shutting it down and then use the oscmstat utility to confirm that there are no active clients. See oscmstat: Displaying Cache Manager Status. Use the oscmshtd utility to shut down the Cache Manager. See oscmshtd: Shutting Down the Cache Manager for details. The next client process that starts automatically starts the Cache Manager.
Obtaining Process Status Information
When an ObjectStore daemon process sends output to stdout or stderr, ObjectStore routes the output to a corresponding file. These files have different names on different platforms. See Finding Files Containing ObjectStore Messages in the chapter corresponding to your platform. Meters
The ossvrstat utility displays information from a Server. For example:
Use the oscmstat utility to obtain information about the Cache Manager, client cache files, and commseg files. See oscmstat: Displaying Cache Manager Status.
Debugging Cache Manager
Use the following command line to start the Cache Manager in debug mode:
oscmgr4 0 debug-levelFor debug-level, specify an integer from 0 through 50. The higher the number, the more information ObjectStore displays about Cache Manager activity.
Monitoring the Server
You can use the ossvrdebug command to set the debug trace level for the Server. See ossvrdebug: Setting a Server Debug Trace Level for more information.
To enable the ossvrdebug command, type ossvrdebug -d 5. To disable the command type ossvrdebug -d 0.
Description of the Server Transaction Log
Each Server keeps a transaction log, which is also called a log file. The most important function of the transaction log is to prevent database corruption in case of failure. The log contains modified pages of data and records about modified pages of data. Log file
The log file stores database modifications until they are propagated to the database. The log does not have a consistent size. It can grow to contain as much data as is written to it. You can use the ossvrstat utility to obtain the size of the log. This is described more fully on ossvrstat: Displaying Server and Client Information.
Location
By default, the Server places its log file in the rawfs. If there is no rawfs, you must use the Log File Server parameter to specify a pathname for the transaction log. See Log File. You cannot place the log file in a raw partition. Server performance is always better when the log is in the rawfs rather than in a native file.
When the log is in the rawfs, it is not visible to you. Its size is limited by the size of the rawfs. The log can span partitions.
Transactions, commits, and the log
When a transaction modifies databases, either all or none of the modifications are made, depending on whether ObjectStore commits or aborts the transaction. This is true even if the Server machine crashes during the transaction. Log File Terms
The log file consists of two log record segments and a log data segment. The Server uses both the log record segments and the log data segment to store data. Log record segment
The Server writes log records, such as commit records, to a log record segment. When a log record segment fills up, the Server switches to the other log record segment. Log record buffer
The Server uses the log record buffer to form log records across sectors. Its size defines the maximum size that you can write to a log segment in one write operation. Each sector includes log header information that indicates which log blocks are valid. Log data segment
As part of a commit record in the log segment, the Server writes data returned as part of a commit. But this occurs only if the total data being committed is small enough to fit in the log record buffer. If it is not, the Server writes the data to the data segment. Propagation
The Server moves committed data from the log to databases through propagation. The information accumulated in the log is propagated from the log to the material (that is, real) database transparently in a way that does not interfere with client performance. After propagation, the space in the log that was occupied by propagated data becomes available for new entries in the log. Sector
A sector is a 512-byte disk block (two sectors equal one kilobyte). When you run the ossvrstat utility, ObjectStore displays many statistics in number of sectors. Log File Size
When the Server recognizes that it needs a bigger transaction log, it increases the size of the log segments according to the Log Data Segment Growth Increment and Log Record Segment Growth Increment Server parameters. See Log Data Segment Growth Increment for details.
When you run the ossvrstat utility, Current log size, in the list of Server parameters, displays the current size of the log. Usually, the log grows to a size that accommodates your application and then stops growing. There is usually no reason to monitor log size or worry about its allocation. However, if an unusual event causes the log to grow too large, there are ways to make it smaller.
Shrinking the
To move or shrink the log, follow the steps below.
log file
This does not actually start the Server; it only reallocates the log. Enter
osserver -ReallocateLog
Warning: Never use -ReallocateLog if the Server is in an inconsistent state. Call the ObjectStore Support group for assistance.
Disk space
Network communications and disk input/output are often the most constraining elements of your installation. Configure your system to minimize network and disk activities. Ensure that applications are designed to minimize this activity. Also, you probably want most of your disks, especially your fastest disks, on the Server.
and network
Managing Memory
To manage the memory that an ObjectStore application uses, you need to understand the concept of address space. What Is Address Space?
ObjectStore transfers an application's data to virtual memory. Data stored in virtual memory can, at any particular time, reside in
Each client process has its own address space. Address space is distinct from virtual memory in that
Each client also has its own transient address space.
Locations for data
An application's data is stored in virtual memory. This means that data is in one of the following:
When a page of data needs to be brought into physical memory, the operating system often needs to make room by removing some other page. When the operating system removes a page from physical memory, it places the page on disk in the appropriate backing store.
If the page contains persistent data, the operating system pages it to the client cache. Each client has its own cache.
If the page contains transient data, the operating system pages it to swap space. Swap space is a disk file or disk partition that is shared by all applications running on the host.
Under immediate assignment, the total amount of address space needed by a segment is reserved the first time any page within that segment is used in the transaction. This address space must be large enough to contain the segment itself, as well as the portions of other segments that are referred to by pointers within the segment.
Under deferred assignment, space is reserved as each page of the segment is used in the transaction, and the amount of space reserved by each page is the minimum required to correctly relocate the page into virtual memory.
The default behavior of ObjectStore in Release 5 is to use deferred assignment, since doing so prevents address space from being wasted. However, under certain circumstances, ObjectStore can detect that the pages in a segment can be brought into virtual memory without any pointer relocation. In order to ensure that the proper amount of address space is reserved without doing pointer relocation, ObjectStore uses immediate assignment for such a segment, provided that doing so does not increase the address space consumption in the transaction above half of OS_AS_SIZE.
There are several environment variables that can be used to change this behavior. See the sections on OS_IMMEDIATE_THRESH, OS_MAX_IMMEDIATE_RANGES, and OS_FORCE_DEFERRED_ASSIGNMENT for more information.
Also note that databases created prior to Release 5 or with OS_FORCE_STANDARD_PRM_FORMAT on can only use immediate assignment until they are upgraded using the osupgprm utility.
Normally, ObjectStore removes the assignments of persistent space at top-level transaction commit or abort. This allows the next top-level transaction to start with an empty persistent storage region.
However, if the application is using retain_persistent_addresses, ObjectStore does not release persistent address space until the program calls release_persistent_addresses.
The environment variables OS_AS_START and OS_AS_SIZE control the amount of persistent address space. Each application can use the default values or specify its own settings. See OS_AS_SIZE.
Physical memory
You can add physical memory to the machine to lower the reliance on backing store. This increases the performance of all applications (ObjectStore as well as non-ObjectStore) because swapping pages out of physical memory happens less often. Operating systems include tools that help you determine when an application is paging, for example, time and top in UNIX. Client cache
Increasing the size of the cache can improve performance because it decreases the need to send pages containing persistent data back to the Server. You can control the size of the client cache with the OS_CACHE_SIZE environment variable. See OS_CACHE_SIZE.
Swap space
Adding more swap space allows you to run more or larger applications. You can add swap space by following operating system-specific procedures. Some operating systems require a system reboot to accomplish this, while others allow swap space to be added while the machine is running. Your operating system includes a tool for determining how much swap space is available, for example, pstat -s in UNIX. How Much Memory Is Needed?
How much memory your application needs depends entirely on the application. Work with the application developers to understand the application's data structures and data access patterns. Start by using the default settings for the variables that control address space. Use test runs of the application to refine memory allocation. Difference Between Assigning and Mapping an Address
When considering how a client uses address space, it is important to understand the difference between assigning an address and mapping an address. Summary of the Kinds of Memory an ObjectStore Application Uses
An ObjectStore application uses three kinds of memory:
Managing the Rawfs
The chapter for your operating system includes information for creating a rawfs. The advantages of a rawfs are that it Advantages
Utilities for Managing the Rawfs
ObjectStore provides the following utilities for managing the rawfs. There are many other utilities that you can use on the rawfs and on rawfs databases, but these are exclusively for operating on the rawfs.
osls oscar::/sax/charlie*
See the chapter in this book discussing your platform. In that chapter are specific instructions for creating a rawfs and starting the Server on your platform. If you decide to reconfigure the rawfs, use that information with these general instructions.
For example, an OS/2 client running APPC and a UNIX client running TCP/IP can access the same Server.
However, be sure to avoid configurations that do not allow Servers to communicate with each other, as described in the next section.
The exception occurs only when a two-phase commit has problems. A two-phase commit usually occurs only if multiple Servers are being written to in that transaction. If a client reads from ServerA in one transaction and writes to ServerB in the same transaction, it is not a two-phase commit and it is not necessary for ServerA and ServerB to be able to communicate across a common network.
You should validate the schemas before you place an application and/or database on a CDROM. In other words, run the application on the database in question (in update mode) and then put the application and/or database on the CDROM. This validates the schemas and sets the appropriate cache state in the databases. The result is improved performance because schema validation is not needed when the application opens the database on the CDROM.
See additional schema validation discussions in the ObjectStore C++ API User Guide, in Chapter 2, Persistence.
What You Need to Know About the API
Some administrative tasks require familiarity with aspects of the API. Capacity planning
Capacity planning requires knowledge of the data structures underlying any ObjectStore classes that the application stores, such as collection, relationship, and reference classes. See the ObjectStore C++ API User Guide.
For Information About | See |
---|---|
References | Chapter 2, Persistence |
Collections | Chapter 5, Collections |
Relationships | Chapter 6, Data Integrity |
Data organization
Managing the physical organization of the data (what is stored next to what) requires knowledge of the application's creation and deletion patterns and clustering directives. For information about creation and deletion patterns, talk to the application developers. For information about clustering, see Chapter 3, Transactions, in the ObjectStore C++ API User Guide.
Indexes and contention
Managing indexes uses the API, and managing contention sometimes involves the API (for example, controlling locking granularity and lock caching). See the ObjectStore Advanced C++ API User Guide for information about indexes - Chapter 5, Queries and Indexes, and for information about controlling locking granularity and lock caching - Chapter 3, Transactions.
Managing Databases
To manage databases, you are likely to perform the following typical operations:
Additional utilities for operating on databases are documented in Chapter 4, Utilities.
Pointers and references
Database management is complicated by the fact that a database often
Schema databases
When you are operating on schema databases, you do not need to identify the data set. A schema database does not have cross-database pointers and references. Operate on the set
After you identify a data set, you can perform an administrative function on the entire set. If you rename or move an individual database in the set, use the oschangedbref utility described in oschangedbref: Changing External Database References to fix any external pointers and references.
Moving, renaming, and dumping databases
Before moving, renaming, or dumping a database, do the following:
Overview of the Backup/Restore Facility
ObjectStore provides the following utilities to back up and restore databases without interrupting production:
On-line backup and archive logging provide these features:
On-line restore and recovery offer these features:
Backup Strategies
When you develop a backup strategy, you need to consider certain conditions of your database environment. The questions to think about include:
After the backup is complete, the backup images can then be moved to tape and eventually be stored in a safe location. For determining the best backup strategy, it is important that production size databases be estimated. If the databases are not in the gigabyte range, then it is better to perform a level 0 (full backup) every night as opposed to doing additional incremental backups. The advantage is that, in the event of a failure, only a single backup image needs to be restored. The following is a sample backup strategy:
Sunday: | Backup level 0 |
Wednesday: | Backup level 1 |
Mon. Tues. Thurs. Fri. Sat.: | Backup level 2 |
For example, if you need to restore the databases on Friday morning, then you must restore the backup images from Sunday, Wednesday, and Thursday. It is advisable to save the previous level 0 backup in another spot before starting the new level 0 backup.
osbackup command flags
Here is a sample backup command you might use:
osbackup -i bkup_rec.txt -l 0 -f full_bkup.img sample1.db sample2.db sample3.db
Archive Logging
The osarchiv utility takes much smaller pictures of the database than osbackup. Object Design recommends that you always run the osarchiv utility, even during an osbackup. The advantage of this is that, in the event of a system failure during the osbackup process, no data is lost. The osarchiv utility performs snapshots of pages modified since the previous snapshot or backup. You specify the interval between snapshots. The osarchiv utility records all transaction activity for specified databases. Since the osarchiv process requires a backup image as initial input, the script responsible for this operation might choose to stop osarchiv and restart it each night after the osbackup process completes successfully. Avoid updates in the window of time following the start of osbackup and the startup of osarchiv so osarchiv does not have to dump full segments. You can move the archive file from disk to tape at this time if disk space is an issue.
YY = | Year |
MM = | Month |
DD = | Day |
HH = | Hour |
ext = | Extension of the form aaa, aab, aac... |
If you decrease the time between snapshots, you also decrease the number of transactions recorded in each snapshot. Shorter intervals between snapshots have the effect of keeping the archive more up to date and keeping the amount of data that needs to be archived smaller. (Can this add to the recovery process?) However, since each snapshot causes information to be written to the archive file even if no data modifications are being recorded, frequent snapshots can consume space in the archive file unnecessarily. Longer intervals can reduce the amount of data being logged in cases where the same data is modified by multiple transactions. In such cases, only the most recent copy of the committed data needs to be logged.
osarchiv command flags
The following is an example of an osarchiv command:
osarchiv -a bkup_rec.txt -d archive_img -i 30 -C sample1.db sample2.db sample3.dbRemember that the incremental record file created with osbackup is the starting point for osarchiv. In the command line example above:
See osarchiv: Logging Transactions Between Backups for further information about the options for this utility.
Special Considerations for Large Databases
The osbackup procedure backs up approximately 4 gigabytes an hour. The backup can take much longer under certain load conditions, such as when updates are occurring on large numbers of pages while the backup is running. Contrast this time requirement with an operating system backup that averages 20 gigabytes an hour. If you have very large databases to back up, the advantage of an on-line back up with osbackup might be less important than the amount of time it takes to do the back up. You might benefit more from shutting the ObjectStore system down and backing up the file system using operating system commands, as described next. Using a file system backup and the ObjectStore archiver
If you keep the ObjectStore's archiver running while the operating system backup is running, the database is never without a recovery mechanism. The most dependable and least time-consuming method of backing up your data is to depend on the operating system backup and the ObjectStore archiver. The sequence of activities you need to complete is summarized in the following list:
The next paragraphs describe how osrestore and osrecovr work.
osrestore -f full_bkup.img
osrecovr -F archive_list.txt
C:\name\user>type archive_list.txt archive_img\97080719.aaa archive_img\97080719.aab archive_img\97080720.aac archive_img\97080720.aad archive_img\97080720.aae archive_img\97080720.aafTo recover to a specific date and time, use a command such as the following:
-F archive_list.txt -D 7/8/97 -r 19:59:45See osrestore: Restoring Databases from Backups and osrecovr: Restoring Databases from Archive Logs for further explanation of options for these utilities.
Using system backup and osrecovr
Archive image files generated in a directory (specified by the osarchiv -d flag) can be deleted or moved to tape at your discretion. In the event of a failure, you can first restore your UNIX or Windows backup files, then invoke osrecovr with the file name that contains a list of all the archived images in the directory that was specified by the -d flag. The Dump/Load Subsystem
This subsystem provides a facility that allows ObjectStore users to dump and load databases into and from a nondatabase format.
See osdump: Dumping Databases and osload: Loading Databases in Chapter 4, Utilities for more detailed information about using the dump/load facility. For advanced topics related to customization, see Chapter 8, Dump/Load Facility in the ObjectStore Advanced C++ API User Guide.
Managing Users
There are two sorts of ObjectStore users:
You can set OS_ROOTDIR on each host that runs an ObjectStore Server or application. Alternatively, you can set OS_ROOTDIR in each user's environment.
OS_ROOTDIR allows you to change the location of the ObjectStore installation and allows users to switch to a different version of ObjectStore.
Alternatively, an application can specify its application schema database pathname when it runs by calling objectstore::set_application_schema_path().
Platform | Local Transport Layer | Remote Network |
---|---|---|
OS/2 | Named Pipes | IP |
AIX Digital UNIX HP-UX | UNIX (uses UNIX domain sockets) | IP |
SGI Solaris 2 | TLI_LOCAL | IP |
Windows | NSharedMemory | IP |
UNIX
On UNIX, the remote network is always TCP/IP. For the local network, ObjectStore uses sockets to communicate among Server, client, and Cache Manager processes. Sockets use predefined ports that you can modify if necessary. A port identifies a particular application on that machine. (An address identifies a particular machine.) Windows and OS/2
On Windows and OS/2, ObjectStore uses a variety of remote networks. Each mechanism has something analogous to port addresses that you control with the ports file. Defaults for Port Settings
For Named Pipes, NetBIOS, and NSharedMemory, the port setting modifies the default port, so you can use the same setting for all services. On the other networks, a port setting replaces the existing port setting, so you must provide unique settings for each port that you modify.
Modifying Port Settings
To modify the settings, you change entries in the file shown in the following table. After you modify the ports file, you must shut down and restart the Server and Cache Manager for the changes to take effect. When the daemons start, they detect the existence of the ports file and use the settings in the ports file.
Platform | Ports File |
---|---|
UNIX | $OS_ROOTDIR/etc/ports |
Windows and OS/2 | %OS_ROOTDIR%\ETC\PORTS |
Ports File Format
Each line in the ports file specifies the port for a network service. The syntax of a line in the ports file is
net:service:version:port
TCP/IP:server client:1:54432If a ports file is not present, ObjectStore uses default settings.
UNIX:server client:1:/tmp/.ostore/objectstore_server_comm UNIX:cache manager client:4:/tmp/.ostore/objectstore_client_cache UNIX:cache manager server:4:/tmp/.ostore/objectstore_server_ cache
To set up two Servers on the same host, you only need to change the server client ports for one of the Servers. The Cache Manager ports are already different in different major versions of ObjectStore.
All Servers that a client can communicate with must have the same network port number. This means that if you run two Servers on one host, any single client can access one of those Servers but not the other. It also means that if a client accesses Servers on more than one host, you must change the Server port settings on all affected hosts.
On non-System V Release 4 systems, such as AIX, Digital UNIX, and HP-UX, specify a combination of UNIX and TCP/IP statements in the ports file. The UNIX domain or local ports have names in the file system's name space.
If you do not specify port settings correctly, and you try to start a second Server or Cache Manager, the operation fails with the following error:
<err-0001-0144>There is a server for the service <sss> already running on net <nnn>.
This all happens automatically and transparently, so there is no relevant API. However, as with all network connections, you might want to control what network port is used by the connection. You can use the ports file in the usual way to control the use of network ports. The relevant information follows.
Name of service | cache manager notification |
---|---|
Default IP port number | 51049 |
Default UNIX local socket file name | /tmp/ostore/objectstore_notification |
How a Client Locates the Server for a Database
How does a client determine which Server to communicate with? The answer depends on whether the database being created or opened is a file database or a rawfs database. When Accessing a File Database
When a client tries to open or create a file database, the client has a pathname for the database. The client looks for the Server on the machine that has the disk on which the database is or will be stored. Normally, this disk is local to the machine with the Server. In other words, the database is Server local.
If there is a locator file, the client checks it to determine which Server to communicate with.
When Accessing a Rawfs Database
When a client tries to open or create a rawfs database, the rawfs host is specified in one of two ways:
Managing ObjectStore on Multiple Platforms
When you manage a site that runs ObjectStore on a variety of platforms, there are issues to consider that do not exist when you run ObjectStore on only one platform. Using Multiple File Systems
ObjectStore is not dependent on a particular file system. If the usual file system calls (such as open, read, write, close) work on the file, ObjectStore can successfully use them. Translating Pathnames
You might run an ObjectStore application on both PCs and UNIX systems. UNIX uses forward slashes in pathnames. PCs use backward slashes. How does ObjectStore handle this? Native pathnames
If you are using something like an NFS client to mount the UNIX file system, you use the client's native syntax. For example, on a PC where drive Q is NFS-mounted on husky:/desktop1, ObjectStore expands the file name Q:\jet\my.db into a reference to /desktop1/jet/my.db on the Server host husky. Server-relative pathnames
If you do not use file mounting, you can use Server-relative pathnames of the form husky:/desktop/jet/my.db. ObjectStore interprets the part of the pathname that follows the colon (:) according to the syntax of the Server host, UNIX in this example. Callback Messages Background
The Cache Manager facilitates concurrent access to data by handling callback messages from the Server to client applications. To understand how callback messages work, you need to know about ownership and locks. Read/write ownership
Read ownership exists when a client has permission to read a particular page. Write ownership exists when a client has permission to modify a particular page.
When a client has ownership, it can place a lock on a page without communicating with the Server.
A client can have read ownership without a read lock if it previously read the page but is not reading the page in the current transaction. The same is true for write ownership and locks.
The lazy release is an optimization. If no other client needs the page that your client has ownership of, then your client does not need to request ownership from the Server for that page for as long as the client is active.
The Cache Manager is involved in the following situations:
If the client with ownership
API for lock management
Normally, ObjectStore performs lock management. There are, however, API features that allow a client to control whether or not a client waits for a lock. When an application uses these features, ObjectStore still uses the lazy release.
Troubleshooting
This section provides some examples of problems you might encounter. In general, when you receive an error message you should
Server initialization failed Trouble accessing ObjectStore file system. Exception message: <maint-0018-0006> File access permission deniedThe Server is not starting. The resource affected is the Server. To obtain more information, you can
OS/2 | OSSERVER.TXT |
UNIX | /tmp/ostore/oss_out |
Windows | %OS_ROOTDIR%\OSSERVER.TXT |
Server initialization failed. (orecvery.cc line 2787) Unknown record type 127528668 at line 1266304 Failed to start ObjectStore serverAgain, the Server is not starting. The resource affected is the Server and the reference to record type might indicate a problem with the log. To obtain more information, you can
Miscellaneous ObjectStore error Reached end-of-file reading initial message from cache manager (PID=0) (err_misc) Segmentation FaultThe resource affected is the Cache Manager. To obtain more information, you can
OS/2 | OSCMGR4.TXT |
UNIX | /tmp/osc4_out |
Windows | OSCMGR4.TXT |
No handler for exception: ObjectStore internal error Database dbname has fraction length? (err_internal)The resource affected is the database or the client application. To obtain more information you can
No handler for exception: Cannot open the application schema <err-0025-0311> The application schema database db.asdb was not found (err_cannot_open_application_schema) While trying to open the application schema database.The resource affected is the database. To obtain more information, you can
The application schema database must be local to a Server. The only exception to this is when you use a locator file. See Chapter 5, Using Locator Files to Set Up Server-Remote Databases.
No Handler for Exception - Invalid Address
When trying to run a client application you might receive a message like this:
No handler for exception ObjectStore internal error ObjectStore referenced invalid address 0x7fff0028(0)The resource affected is the client application. To obtain more information you can
Attempt to use unsupported server protocol. <err-0001-0006> Server elvis does not support version 4.0 clients. (err_protocol_not_supported)ObjectStore displays this message when a Release 5 client tries to communicate with a non-Release 5 Server. This error might occur if you did not shut down the non-Release 5 Server while you installed the Release 5 Server. Shutting down and restarting the non-Release 5 Server should correct the situation.
The exception occurs only when a two-phase commit has problems. A two-phase commit usually occurs only if multiple Servers are being written to in that transaction. If a client reads from ServerA in one transaction and writes to ServerB in the same transaction, it is not a two-phase commit and it is not necessary for ServerA and ServerB to be able to communicate across a common network.
No handler for exception: The server is out of disk space for the database or logfile set_segment_size call to server (host "rexx")When you check your system, you might have statistics such as the following
rexx:phawkins(678)> df .:
Filesystem | Total KB free | %used | iused | %iused | Mounted on |
/dev/lv00 | 2002944 | 411296 | 79% | 5439 | 1% h/rexx/2 |
rexx:phawkins(679)> ls -l mydb -rw-rw-r-- 1 phawkins sys 1073082368 Sep 26 17:26 mydbThe problem is that you are reaching the AIX operating system default limit for the root process. This limit is 2097151 blocks, or 1073741312 bytes. The exact database size that the failure occurs at varies.
To change the limit, change the file /etc/security/limits and add -1 for the root fsize limit. For example:
default: fsize = 2097151 core = 2048 cpu = -1 data = 262144 rss = 65536 stack = 65536 root: fsize = -1 daemon: bin: sys: adm: uucp: guest:
This requirement applies to any ObjectStore database stored under a virtual file system and includes any object that the Server must access. The Server must be able to access whatever pathname is provided. This can be a virtual file system pathname if the Server is running under a virtual file system.
Some virtual file systems provide a way to return an absolute (nonvirtual) pathname for a given element in a virtual file system. This pathname can enable the ObjectStore Server to locate the element. It does mean the loss of the ability to use leaf names (such as eng_1.libschema in the following example) as arguments to ObjectStore utilities.
> pwd
/home/clients/libschemas
> ls
test_1.libschema eng_1.libschema qa_1.libschema
> ossize eng_1.libschema
ossize: The database was not found <err-0025-0351>The database
"/home/clients/libschemas/eng_1.libschema" does not exist (err_database_not_found)
Updated: 03/26/98 20:13:22