数据库k/v存储模型浅析——Hash,B树,LSM

1.基于哈希的存储引擎

 常见模型是BitCask

  并发下的数据库文件读写:

  本来想使用FileLock,但是后来发现 FileLock是进程间的,并不能用于同一个JVM多个线程之间的同步:

File locks are held on behalf of the entire Java virtual machine.
* They are not suitable for controlling access to a file by multiple
* threads within the same virtual machine.






猜你喜欢

转载自www.cnblogs.com/shawshawwan/p/9757468.html