Comments (4)
I found a bit strange behaviour, I restarted it with -f and LOGLEVEL=DEBUG
now is working fine ;)
[oracle@linuxsource ~]$ ls -l /home/oracle/test121/plsql/PIORO/PROCEDURE/
total 0
-rw-r--r--. 1 oracle oinstall 88 Jan 10 06:58 TEST.SQL
from ddlfs.
Hi,
The behaviour described is expected, although it may seem strange at first. It depends on filesize
mount option.
All uncached files will report filesize of n bytes, where n is the value of filesize
mount option.
Files are put into cache whenever they are opened. Except if you specify filesize=
-1
- in this case files are put into cache not only on open() but also whenever they are listed (using ls
for instance).
"cache" that I'm describing is actually just a regular folder on physical filesystem (such as ext4), specified by temppath
mount option. You can issue ls
in that cached folder to see cache contents.
In release 1.0, the cached file was deleted on close(). This is changed if you compile from latest source so that cache is deleted on umount. Features mentioned from this point on are available in latest source, but not in release 1.0:
That means, if you specify filesize
>= 0, it will report:
- correct file size for all files that were opened since mount.
- incorrent (value of
filesize
) for files that were never opened since mount.
Contents of temppath
can be reused after umount. Actualy, specifying (currently undocumented) keepcache
mountoption will not delete contents of cache directory.
This is important, becase, as mentioned, git only works if filesystem provides (strictly) correct filesizes.
So, specifying filesize=-1
will make git work as well =)
This, however, has terrible effect on peformance if the cache is empty. But, once every .sql file is cached it is as fast as specifying filesize=0
. This basically means that if you use crontab script which does git commit
once a day or so, it will be ok (except for the first commit). In such scenario I would recommend setting filesize=-1,keepcache
.
In the other case, if you wish to work with .SQL files interactively (like using VIM etc), I wold recommend to use filesize=0
(without keepcache
).
When is the cached version invalidated?
For every cached .SQL file ddlfs also stores last_ddl_time of that object as it was when it was cached. On every file open and file listing, the last_ddl_time from dba_objects is compared to that written in cache. If it is not the same, cached version is updated (source is downloaded from database).
I would be happy to look into the issue if you find behaviour inconsistent with what I just wrote. Also, any ideas for improvement are appreciated - especially if they come in the form of code/patches :)
p.s. I'm a bit busy currently, but i do intend to put more effort in this project once I lower my backlog in "commercial" work :)
from ddlfs.
I'm still not sure what would be a better default for next release, filesize=-1,keepcache
to make most software work or filesize=0,nokeepcache
which is cleaner, faster and makes a lot of software (but not git) work :)
from ddlfs.
this was a bug - filesizes were always reported correctly, even when filesize parameter was not set to -1.
this was fixed in today's commit.
from ddlfs.
Related Issues (13)
- Obtain triggers/ from all_source
- Support for editionable objects HOT 1
- Test scripts HOT 1
- Support for external authentication HOT 1
- Ignore SYS.BFILE of type TYPE HOT 1
- Make query "faster" when locally cached version already exist. HOT 1
- 4 kB read block HOT 6
- execution bit
- DBRO options need a DBA user
- dbro & execution bit HOT 1
- Windows? HOT 8
- Support for SYNONYM HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ddlfs.