Wed Sep  8 13:13:13 1993    (jaffer at jacal)

	* wb1a2: released.
	* make.scm (make-blkio): added to control compiling of blkio.scm.
	* db.c (init_db): now does add_final(final_db) for compatability
	with scm4c3.
	* Makefile: gzip suffix changed to .gz

Tue Jun 29 16:22:15 1993  Aubrey Jaffer  (jaffer at wbtree)

	* wb1a1: released.
	* view.c: now automatically detects block size.

Mon Jun 28 16:01:06 1993    (jaffer at jacal)

	* db.c (final-db): calls final-wb.

	* ent.scm (init-wb final-wb): renamed from init-sys! and final-db.
	Init-wb returns number of ents allocated.

	* db.c (str2long long2str!): now defined for user in SCM.

Tue May  4 17:49:12 1993  Aubrey Jaffer  (jaffer at wbtree)

	* db.c example.scm test.scm test2.scm db.scm: prefixed Scheme bt
	operations names with "bt:".

	* db.c: removed rdss specific code.

Tue Apr 27 18:08:18 1993  Aubrey Jaffer  (jaffer at wbtree)

	* db.scm db.c (scan): now accepts #f instead of function.

	* scan.scm (bt-scan): now copies ent for COUNT-SCANs.  This
	eliminates ACCREAD contention.

Fri Apr 16 00:00:37 1993  Aubrey Jaffer  (jaffer at montreux)

	* example.scm: split out from db.doc.

	* defs.scm: REM-SCAN=-1, COUNT-SCAN=0, and MODIFY-SCAN=1.

Mon Apr 12 15:42:28 1993  Aubrey Jaffer  (jaffer at wbtree)

	* db.c db.scm (scan): implemented.

	* defs.scm ent.scm (ENT-TAB-INC): added for use by init-sys!.

	* comp.scm ent.scm (flc-fill flc-proc): changed long-tab to
	long-ara so storage would be temporary, rather than malloc()ed.

Thu Apr  8 17:12:40 1993  Aubrey Jaffer  (jaffer at wbtree)

	* Split blink into db and rdss.

Thu Mar 25 10:12:06 1993  Roland Zito-Wolfe  (rjz@wbtree)

	* fixed bug where FINAL didnt close segs properly
	* modified FLUSH-SOME-BUKS to scan for dirty blocks w/o
	  writing, if MAXNUM=0. 
	* split FLUSH-SEG into FLUSH-BUFFER and PURGE-BUFFER
	** Fixed Problems with database closing

Tue Mar  9 10:08:46 1993  Aubrey Jaffer  (jaffer@wbtree)

	* handle.scm (bt-rem-range): removed last argument; now always -1.

Thu Mar  4 11:09:16 1993  Aubrey Jaffer  (jaffer@wbtree)

	** verified free-lists I/O reduced as expected,
	   and deferred data i/o works; extended STATS a little bit;
	** remove TMP-STR global string from DB

Thu Jan 21 rjz
	* added deferred writes of data blocks
	* NOTE: there was a bug in CHAIN-PUT; it wasnt forcing 
	  an ENT-WRITE of ENT in the XENT case! oops!
	* Implemented deferred leaf writes on data deletes
	* deferred writes on insert to free list (in handle?)

Fri Jan 15 rjz
	* wrote down latest thoughts on delayed INDEX inserts and deletes,
	  the DELETE 2-write screw case, and when to retry deferred ops


Thu Jan  7 rjz
	* added level-order check to FIND-ENT and FIND-PREV-ENT
	* added MATCH range generator [see NOTES in DOC and RANGE]
	* put global lock around empty-blk
	* put lock around FILL-FLC code to prevent FILL competition
	  [I put it around BOTH types of filling, ie, both filling
	   from the free list AND file extension.]

Thu Dec 16 rjz
	* split test code into 2 files, TEST and TEST2

Thu Dec 16 rjz (cumulative list of recent fixes)
	* impl read-only DB's
	* init time specification of size parameters.
	* fix FILL-FLC to use DELETE-SCAN
	* added MODIFY-SCANs to scan code

Tue Dec  8 13:34:57 1992  Aubrey Jaffer  (jaffer@sbux)

	* comp.scm (compile-exp): support for logical operations added.

Thu Nov 19 17:33:26 1992  Aubrey Jaffer  (jaffer@sbux)

	* TBD: created.

	* created deferred update plan.

	* scan.scm: compiles and runs.

Thu Oct  8 15:29:13 1992  Aubrey Jaffer  (jaffer@sbux)

	* ent.scm (try-get-free-ent): now will rel-buk if no entry
	returned from select-idel-ent.

Thu Jun 18 14:32:38 1992  Aubrey Jaffer  (jaffer at train)

	* ent.scm (initload-flc! blk-free): initload-flc! created.
	blk-free calls it if needed.

	* del.scm handle.scm (chain-rem parent-delete-update bt-rem):
	release-ent! moved out of chain rem and into callers.

	* del.scm (BLK-DELETE): checks that ref-ct<2 before changing prev
	block's NXT pointer.  Deferred count now reflects failure to
	delete block.

	* blink.scm (chain-put!): retains name access on new block until
	parent-insert-update is complete.

	* blink.scm (next-nonempty-ent): changed get-ent ACCWRITE to
	ACCREAD and used ent-update-access.  Fixed nasty bug.

Mon Jun  8 18:09:09 1992  Aubrey Jaffer  (jaffer at PIXEL)

	* handle.scm (bt-write): created.

	* handle.scm blink.scm (chain-get): removed and put into bt-get.

	* blink.scm (chain-rem): now fills new arg ans-str if not #f.

Thu May 14 14:56:56 1992  Aubrey Jaffer  (jaffer at train)

	* ent.scm (ent-write): now does check-key-order!.

Tue May 12 14:47:30 1992  Aubrey Jaffer  (jaffer at train)

	* comp.scm: all longs are now unsigned.

	* handle.scm (bt-create bt-open): now set HAN-LAST.

	* ent.scm: Roy rewrote.

Thu May  7 13:25:38 1992  Aubrey Jaffer  (jaffer at train)

	* ent.scm (flc-fill): blks now allocated in numerical order.

	* sys.h sys.scm (root? end-of-chain?): moved here and do pointer
	funniness for efficiency.

	* db.c (create-db open-db): modified to use Jonathon's format for
	directory value entries.

Wed May  6 12:55:25 1992  Aubrey Jaffer  (jaffer at PIXEL)

	* stuff fixed.  Released to Jonathan.

	* defs.scm (next-field): moved from blink.scm so that it will
	compile as a macro.

	* blkio.scm(extend-file blk-write blk-read blk-file-close
	blk-file-open blk-file-create min-file-create): created.  All blk
	i/o goes through these routines.

From rjz@chaos.cs.brandeis.edu Tue Apr 28 12:38:57 1992
Return-Path: <rjz@chaos.cs.brandeis.edu>
Date: Fri, 24 Apr 92 13:00:51 -0400
From: "Roland Zito-Wolf" <rjz@chaos.cs.brandeis.edu>
To: jaffer@ai.mit.edu, rjz@chaos.cs.brandeis.edu
Subject: DATABASE

I made several modifications. The major items are:

1. adding some performance reporting
2. fixing parent-insert-update
3. Fixing CACHING special cases
4. Testing behavior with empty blocks and missing pointers
5. Found PREV bug (but Not fixed yet)

Detailed change inventory:

(items in parens are redos of stuff we did at last DMC session,
as i didnt have the current code)

ADDED SOME PERFORMANCE STATISTICS:
1. added stat code at front of BLINK (STATS, CSTATS, CLEAR-STATS)
2. added ctrs to BT-X, BLK-READ/WRITE, PUT, DELETE-BLK, 
   GET-ENT, TRY-GET-ENT, cache-checking routines
2a. added CLEAR-STATS call to INIT-SYS!
3. added VALUE arg to ADD! also starting-value and increment, aka REMOVE!
5. Restored SHOW-BUFFERS to ENT (was SHOW-ACCESS!), 
  improved output format, added flag to
  allow filtering out of reclaimed buffers, added abbreviation (SB).

UPDATE CODE:
14. rewrote PARENT-INSERT-UPDATE to be an atomic operation.
   sadly, a fair bit of the work falls onto CHAIN-PUT; perhaps once its 
   working we can figure out a better structure?
   Fix has been tested wtih 200 ADDs; however, the screw cases where the
   NEXT-KEY is in a different block -- and worse, where there are intervening
   empty blocks -- HAVE NOT BEEN TESTED YET.
16. Added global var DEFER-INSERT-UPDATES to force deferral of parent-updates
   for testing other code (Everything seems to survive it except PREV (see #18)
17. Added global DEFER-BLOCK-DELETES to force deferral of block-reclamation.
   Running with it on does not seem to cause any malfunctions in NEXT or PREV.

MISC:
9. changed FPRINTF to take F format (precision arg doesnt work, though)
10. Extended PACKET structure (SCHEME only)
11. fixed BLK-FIND-POS to return location of PREVIOUS key (see #12)
12. fixed PREV code to use #11 to avoid redundant block scans
    (MORE TO BE DONE: Fix its CACHE code to do so also)
13. Moved orphaned  "as we go" comment in BLINK back to BLK-FIND-POS
15. Started writing a design notes file
20. Fixed CHAIN-NEXT and CHAIN-PUT to update HAN-LAST optimally
    (passed though the PACKET). Things still work; a quick test indicates
    its helpful for NEXT but for some reason the fix ISNT helping for PUTs --
    at least not in the test i ran. (see observation 6)

REDOS:
4. (put in the 1-line mod to CHAIN-FIND-PREV-ENT)
6. (added ENT-WRITE calls to DELET-BLK and PARENT-DEL-UPDATE. But see #8)
19. (moved SET-HAN-LAST call into CHAIN-FIND-ENT)

(NOT REDONE:
   - the changed i/o message format
   - buffer aging tweaks
   - anything else I coundn't recall)

BUGS:
7. CUTE BUG: RELEASE-ENT was writing over the age=128 that AMNESIA-ENT set,
  thus preventing their buffers from being reclaimed preferentially!!!
  (examples traces appear as OBS #5) In any case, the right thing to do is
  simply to splice the ENT out directly, then you dont have to 
  waste time searching for it. (I believe you said you were doing this, so
  I'll leave it alone for now.)

8. CUTE BUG#2: cant put ENT-WRITE in PARENT-DELETE-UPDATE, because
CHAIN-REM releases the block; have to put it into CHAIN-REM instead!!
(I dont know how we did it last time; the probem only shows up
on index-level deletes; also, fix saves a block write.)

Thu Mar 26 13:31:20 1992  Aubrey Jaffer  (jaffer at train)

	* prev.scm (at-root-level?): now checks first to see if ROOT? blk.

Fri Mar 20 13:31:59 1992  Aubrey Jaffer  (jaffer at PIXEL)

	* ent.scm (free-blk!): now calls amnesia-ent!.

	* defs.h (amnesia-ent!): created.

	* ent.scm (get-ent): now does not read blk when given ACCWRITE.

	* ent.scm (flush-and-del-buffer): now checks that ent is not
	ACCWRITE or ACCPEND.

	* ent.scm (flush-buffer): removed.

	* defs.scm ent.scm (BLK-TYP?): created and used.

Thu Mar 19 15:34:14 1992  Aubrey Jaffer  (jaffer at train)

	* ent.scm (create-new-blk-ent): Backs out if flc-fill fails.

	* ent.scm (fill-flc!): now does one disk write to extend the file.
	fill-flc! ==> flc-fill and returns #t on success.  #f if no more
	disk available or bt-rem failed.  Prints out error message if no
	more disk space available.

Wed Mar 18 18:13:44 1992  Aubrey Jaffer  (jaffer at PIXEL)

	* blink.scm ent.scm (create-new-blk-ent fill-flc! free-blk!
	flush-flc!): move from blink.scm to ent.scm.  Now all use of
	ENT-ACC is in ent.scm.

Tue Mar 10 13:25:06 1992  Aubrey Jaffer  (jaffer at train)

	* handle.scm (bt-open bt-create): commented out call to
	(check-access!) because Jonathon keeps program entries locked.

STATUS: (prev) working ( for (test1) data); needslarger test
        index-split fixed (cant call INDEX-SPLIT before INIT-NEXT-BLK!)
add multiple filenames;  warning message if filename does not
  match database name.
allow blk sizes to be specified in superblock
FLUSH on CLOSE-SEG! needs to REMOVE the entries for the database
  closed from the entry table, as well as writing out the dirty entries
flush-buffers wrong.
add DELETE-ENT and freelist B-tree
fix TSCAN! to verify key squencing
