[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple files per database in Objectivity




 
> Arie Shoshani wrote:
> > 
> > The directory will not contain the names of individual files, only the
> > name of the database.  However, a function will be provided to get the
> > container size and the file size for each database.  Thus, given an
> 
> Do you mean "the file sizes for the files that make up the database"? So
> it will return a list of file sizes? Can the container size change from 
> container to container in a DB? If it can (which it probably can) then
> you need a list of all container sizes too.

No, you can only inquire what is the max container size and the file size 
for each database.  You get a single number for each, and from that you can 
calculate which containers go to which file.


> > p.s.  I asked if it will be possible to have open_file, close_file
> > functions, so that when writing one does not have to keep tracks which
> > containers to write to.  A "close" could be fake, only having the effect
> > of stopping the writes into a file.  An "open" will have the effect of
> > starting the following write to the first container of the next file.
> 
> Above you wrote:
> > However, if one wished to terminate a file before all of its containers
> > are full, that can be done by asking to write to the first container of
> > the next file. 

> How is this different from your close_file/open_file?

You don't open and close file according to the current scheme.  You close a 
database and all the files in that database close at the same time.

If you could close a file in a database, then opening the next file in that 
database would position you at the first container of the next file.  Also, 
opening that file (assuming it was partially written into) and doing append 
will append to the last container that was touched.  Now, you'll have to 
figure out which container to go to yourself.

Arie.